Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert from 12 hrs to 24 python

    >>> from datetime import datetime
    >>> m2 = '1:35 PM'
    >>> in_time = datetime.strptime(m2, "%I:%M %p")
    >>> out_time = datetime.strftime(in_time, "%H:%M")
    >>> print(out_time)
    13:35
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #hrs #python
ADD COMMENT
Topic
Name
4+6 =