DatePart From String

Robert Rawlins - Think Blue robert.rawlins at
Tue Jul 3 11:01:02 CEST 2007

Hello Guys,


I have a date/time as a string which looks like this: 2007-02-01 00:00:00


I'm trying to get my hands on the different date parts of that string in the
following formats:


Time Only: 00:00:00

Day As Number: 01

Month As Number: 02

Day As Word: Monday


I've tried using the time.strptime() function without much success so
thought I'd come and ask your advice.


Thanks guys for any advice,



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list