Kodi Community Forum

Full Version: Datetime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i would like just to extract hours and minutes from this

Code:
timestamp = 1350277200
print datetime.fromtimestamp(timestamp)

it returns

Code:
2012-10-15 06:00:00
but would like just the time

no date nor seconds

like this how do i go about it?
Code:
06:00
http://docs.python.org/library/datetime....e-behavior

i think:
PHP Code:
datetime.strptime(date_string,%H:%M