Tag Archive > appengine

MansoTrick: Convert 24h time string to 12h AM/PM format (Python)

Manso trick to convert from 24h time format to 12h (AM/PM) time format in Python def ampmformat (hhmmss): “”” This method converts time in 24h format to 12h format Example: “00:32” is “12:32 AM” “13:33” is “01:33 PM” “”” ampm = hhmmss.split (“:”) if (len(ampm) == 0) or (len(ampm) > 3): return hhmmss # is […]

Continue reading

, ,