I
I
Ilyas2017-08-07 17:44:54
Python
Ilyas, 2017-08-07 17:44:54

How to write time in excel field?

Hello, I am using the xlwt library to generate an excel file.
I need to write timedelta objects in excel in the "time" format, tell me how this can be done?
Thanks for answers!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mercury13, 2017-08-07
@id2669099

1. Write the time as a double in the format “1 day = 1; 1 second = 1/86400".
2 is the easy way. Apply one of the predefined number formats (I think 2E 16 = [h]:mm:ss over 24 hours works best ).
2 is the hard way. Play around with format strings.

A
Axian Ltd., 2017-08-07
@AxianLTD

Generate the desired template in exel and output from it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question