getting system date
Tim Heaney
heaney at cablespeed.com
Sat May 10 11:43:15 EDT 2003
"Psybar Phreak" <psybar_phreak at yahoo.com> writes:
> what type is that result?
>
> i mean - do i use %s, %i ?
It's a string. You can just try it and see.
$ python -c 'import time; date = time.strftime("%Y-%m-%d"); print "%s" % date'
2003-05-10
$ python -c 'import time; date = time.strftime("%Y-%m-%d"); print "%i" % date'
Traceback (most recent call last):
File "<string>", line 1, in ?
TypeError: an integer is required
Tim
More information about the Python-list
mailing list