I want to get the correct time from this datetime
string including the am and pm in python.
eg: 2017-04-11T10:34:50.472580Z.
I want it like this
Apr 11, 2017 4:04:50 PM
I want to get the correct time from this datetime
string including the am and pm in python.
eg: 2017-04-11T10:34:50.472580Z.
I want it like this
Apr 11, 2017 4:04:50 PM
maybe you want to use something like :
date.strftime(format)
Return a string representing the date, controlled by an explicit format string. Format codes referring to hours, minutes or seconds will see 0 values. For a complete list of formatting directives, see section strftime() and strptime() Behavior.
date.__format__(format)
Same as date.strftime(). This makes it possible to specify a format string for a date object when using str.format(). See section strftime() and strptime() Behavior.
you will find more details and examples here :