Should be quick, but I can't for the life of me figure this one out.
I'm given the following strings:
- 201408110000
- 201408120001
- 201408130002
Which I loaded as a date(?) time object via the following:
dt = time.strptime(datestring, '%Y%m%d%H%M%S')
Where datestring is the string.
From there, how do I output the following:
- 11-Aug-14
- 12-Aug-14
- 13-Aug-14
I tried str(dt)
but all it gave me was this weird thing:
time.struct_time(tm_year=2014, tm_mon=8, tm_mday=11, tm_hour=12, tm_min=1, tm_sec=5, tm_wday=0, tm_yday=223, tm_isdst=-1)
What am I doing wrong? Anything I add so far to dt
gives me attribute does not exist
or something.
strftime
? – Kevinattribute does not exist
. – zack_falcon