jbcurtin
jbcurtin

Reputation: 1803

String to Datetime

I found this question which answered most of my question, however I have a .[dot] at the end of my string:

2011-03-09T09:58:28.649615

What %[a-z] do I need to use and were can I find more information on this. I know it's related to c.

thanks!

Upvotes: 2

Views: 634

Answers (1)

Freax
Freax

Reputation: 91

the part after the dot are probably microseconds...

datetime.datetime.strptime("2011-03-09T09:58:28.649615","%Y-%m-%dT%H:%M:%S.%f")

reference: Python documentation

Upvotes: 3

Related Questions