Microsoft-style format strings

Mike Fletcher mfletch at
Mon May 22 18:24:30 CEST 2000

See the time module's strftime documentation for more general formatting of
dates.  For the formatting of currency, see posts from sometime this month
(see dejanews) regarding locales.  For general string formatting, see the
string formatting section of the docs (

import time
time.strftime( '%a %d-%b-%Y', time.gmtime( time.time()))


"Andy Robinson" <andy at> escribió en el mensaje
> Has anybody written anything analogous to the
> VB-style format function?
> This would be able to do
>    format("$#,##0.00", someAmount)
> or
>    format("ddd dd-mmm-yyyy", someDate)
> Hoping-to-save-an-hour-or-two-ly y'rs,
> Andy Robinson

More information about the Python-list mailing list