Using Python, I save the date and time as datetime.datetime in GAE. Is there a way to get the date value in milliseconds as opposed to a fully formatted version of the string?
Based on the docs for datetime.datetime, I don't see any built-in methods in the date time class that does this. http://docs.python.org/release/2.5.2/lib/datetime-datetime.html
The original date value is saved as follows:
date_time_float = 1015182600 #some date as timestamp date_time_object = datetime.fromtimestamp(date_time_float);
When I retrieve data from the store, it is of type:
type(exported_date_time) # type: datetime.datetime
There's strftime to convert to a string representation, but what I'm looking for is to convert 'exported_date_time' to milliseconds.
python google-app-engine
Dan holman
source share