Hi Folks,
I have an object with a model.DateTimeField on it. For various reasons, I
need to set the time portion of this field to 23:59 when I populate it from a
form.
datetime = models.DateTimeField()
How can I do this? I've tried
self.datetime = pForm.cleaned_data['datetime']
self.datetime.replace(hour=23, minute=59)
but hour isn't accepted as a parameter to replace.
I'm also confused as to how the DateTimeField maps on to a python datetime
object, can anyone educate me?
Thanks,
Tim.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---