fromtimestamp is exactly the ticket.

Thanks!

On Sep 30, 6:16 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2008-09-29 at 14:08 -0700, Peter wrote:
> > Hi folks,
> >   I want to check a form when it submitted to see whether it contains
> > an input called 'lastUpdate'
>
> >   If lastUpdate is blank I want to populate it with the current time
> > (preferably as the number of milliseconds since 1970 so js can load it
> > easily, date:"U" seems to cover it)
>
> >   If it isn't blank I want to use it's value to create a date in
> > django.  This is the bit that is giving me grief.
>
> Python's standard library function datetime.datetime.fromtimestamp()
> will do what you want.
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to