bhaskar20001
asked on
How to convert bigint(20) into timestamp format using python
I have file with contents retrieved from mysql DB.
which has a time field with type defined bigint(20)
I want to parse that field into timestamp format(YYYY-MM-DD HH:MM:SS GMT) using python code.
The value I found for that field is 212099016004150509
Give me sample code that does the conversion.
Thanks
bhaskar
which has a time field with type defined bigint(20)
I want to parse that field into timestamp format(YYYY-MM-DD HH:MM:SS GMT) using python code.
The value I found for that field is 212099016004150509
Give me sample code that does the conversion.
Thanks
bhaskar
The value you provided does not make sense to me as a date and time, nor as a unix timestamp. Can you please explain to what date and time does this value correspond?
ASKER
I also felt like that at first look as it is of length 18 digits long. But after browsing the net I found that there is possibility that the timestamp has been storing in this format in some DBs.
212099645407486318 is mostly nearby to the time 2009-Jan-25 12:16:00 GMT
I'm not sure about exact equivalent of time for the value given.
212099645407486318 is mostly nearby to the time 2009-Jan-25 12:16:00 GMT
I'm not sure about exact equivalent of time for the value given.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.