List Info

Thread: date time errors: please explain?




date time errors: please explain?
user name
2006-03-01 07:21:14
I'm pretty sure that fields defined as DateTimeField in
your model are
converted to python datetime objects when read from the
database.

That means you can use all the datetime methods on it, like
datetime.timedelta for example.

Check out
http://groups.google.com/group/django
-users/browse_frm/thread/8d10d2ca33e18e00/9c747b0894d22fda?q
=timedelta&rnum=1#9c747b0894d22fda
for more details.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

date time errors: please explain?
user name
2006-03-02 04:06:15
Correct me if I am wrong, but timedelta doesn't allow for
months, does
it?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

date time errors: please explain?
user name
2006-03-02 07:20:18
gizo wrote:

> Correct me if I am wrong, but timedelta doesn't allow
for months, does
> it?

that's because "one month" isn't a
well-defined concept (what's
date(2006,1,31) plus one month, for example?).

here's a comp.lang.python post that points to a solution:

http://article.gmane.org/gmane.comp.python.general/4273
66

hope this helps!

</F>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )