ForumsDevelopersHow to decode the value of date files in the Backup XML
How to decode the value of date files in the Backup XML
Author |
Message |
charles.cave
|
Hello,
I would like to parse the Backup XML to produce some special reports, but I don't know how the dates can be decoded.
For example:
<export_date>1366696711</export_date>
<duedate>1366632000</duedate>
How can I convert this number into YY, MM, DD and possibly HH and MM if I have enabled using times?
Thanks,
Charles
|
Jake
Toodledo Founder
|
|
charles.cave
|
Thanks! I should be able to easily convert using the Python
datetime module:
import datetime
print(datetime.datetime.fromtimestamp(int("1284101485")).strftime('%Y-%m-%d %H:%M:%S'))
|
You cannot reply yet
U Back to topic home
R Post a reply
To participate in these forums, you must be signed in.