Hi tom,

To go from a datetime object to a float representing the epoch
seconds, you can do:

x = datetime.datetime.utcnow()
time.mktime(x.timetuple())

Does this sound like what you are looking for?

Happy coding,

Jeff

On Oct 5, 2:57 pm, tom <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I'm working on a project that needs timestamps out of the db, and I'd
> like to do it as cleanly as possible. Is there any easy way to do
> this? I'm storing all dates as DateTime fields, and thinking about
> adding an accessor method to the model, but I can't see how anyone has
> done this so far, and can't find any python functions for doing this.
> It seems way too simple to be this hard, so I'm guess I'm missing
> something obvious.
>
> Any ideas?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to