How are you importing datetime? In python 2.7, import datetime
datetime.datetime() is callable not datetime() by itself. On Fri, Apr 27, 2012 at 8:46 AM, Gopi Kirupanithi <[email protected]>wrote: > Actually I am using datetime object for comparing two date inputs. > > if datetime(fromdtpart[2],fromdtpart[1],fromdtpart[0]) < > datetime(todtpart[2], todtpart[1], todtpart[0]): > > while execute the above line, I got the " 'module' object is not > callable " error. > > > Anybody can explain why this error occur.. > > -- > 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. > > -- 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.

