Possible Duplicate:
Convert string to datetime in django?
how to convert time string like '18:30:00' into datetime 开发者_StackOverflow中文版in python?
Use the datetime.datetime.strptime() method
My post in Daniweb:
Date string to date object, seconds to readable string
You seem to only consider time part, it is trivial to convert by simple split.
http://docs.python.org/library/time.html#time.strptime
That is the best way to do it
精彩评论