getting system date

Psybar Phreak psybar_phreak at yahoo.com
Sat May 10 11:29:34 EDT 2003


what type is that result?

i mean - do i use %s, %i ?

thanks!

"Tim Heaney" <heaney at cablespeed.com> wrote in message
news:87znlusu5s.fsf at mrbun.watterson...
> "Psybar Phreak" <psybar_phreak at yahoo.com> writes:
> >
> > im using python cgi in my website, and wanted to get the system date in
the
> > format YYYY-MM-DD
>
> How about strftime in the time module?
>
>   $ python -c 'import time; print time.strftime("%Y-%m-%d")'
>   2003-05-10
>
> I hope this helps,
>
> Tim






More information about the Python-list mailing list