trouble with time --again

N

nephish

Hey there,
could someone show me where i am going wrong here?

raise ValueError("time data did not match format: data=%s fmt=%s" %
ValueError: time data did not match format: data=%Y-%m-%d%H:%M:%S
fmt=2005-01-01 8:20:00

i have looked over the strptime and strftime over and over, dont get
where i am missing it here.

thanks
 
K

Kristian Zoerhoff

Hey there,
could someone show me where i am going wrong here?


raise ValueError("time data did not match format: data=%s fmt=%s" %
ValueError: time data did not match format: data=%Y-%m-%d%H:%M:%S
fmt=2005-01-01 8:20:00
Try:

I think you have the data and format strings swapped.
 
D

Do Re Mi chel La Si Do

Hi !


Try :

import datetime
date1 = datetime.datetime(2005,01,01,8,20,0)
print date1.strftime('%Y-%m-%d %H:%M:%S')



@-salutations

Michel Claveau
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top