Dustan,

Python has a module called, appropriately, "time". Like most things in
Python, it's fairly simple and straightforward to use.

The module is documented here:
http://docs.python.org/lib/module-time.html

Breifly, though, the format you want is built right into time:

>>> import time
>>> now = time.localtime()
>>> print now
(2006, 2, 5, 13, 21, 15, 6, 36, 0)

So to get the year, month, and day you would just have to manipulate
the values returned by time.gmtime().

- Dave

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to