In a windows (windows xp) batch script i need to format the current date and time for later use in files names, etc. It is similar to stack overflow question how to append a date in batch fil There's no way to get more to the point than this answer.

If you are in doubt … This gives the execution time in seconds. Another option since python 3. 3 might be to use perf_counter or process_time, depending on your requirements. Before 3. 3 it was recommended to use time. clock …