Time functions

HMS Surprise john at datavoiceint.com
Wed May 2 13:03:20 EDT 2007


On May 2, 12:00 pm, HMS Surprise <j... at datavoiceint.com> wrote:
> I wish to generate a datetime string that has the following format.
> '05/02/2007 12:46'. The leading zeros are required.
>
> I found '14.2 time' in the library reference and have pulled in
> localtime. Are there any formatting functions available or do I need
> to make my own? Perhaps there is something similar to C's printf
> formatting.
>
> Thanks,
>
> jvh (whose newbieism is most glaring)

Oops, it appears I overlooked strftime.

Regrets,

jvh




More information about the Python-list mailing list