Quite simple newbie question:
What is the object used in python to specify date (and time) in Python?
For instance, to create an object that holds a given date and time, (let's say '05/10/09 18:00').
EDIT
As per S.Lott request, what I have so far is:
class Some:
date =
I stop there, after the "=" sign for I realize I didn't knew what the right object was ;)
解决方案
Simple example:
>>> import datetime
# 05/10/09 18:00
>>> d = datetime.datetime(2009, 10, 5, 18, 00)
>>> print d.year, d.month, d.day, d.hour, d.second
2009 10 5 18 0
>>> print d.isoformat(' ')
2009-10-05 18:00:00
>>>