HomeCommon › USA date & time

USA date & time in Python strftime()

US-style date with a 12-hour clock time and AM/PM.

Format string
%m/%d/%Y %I:%M %p
Example output
06/18/2026 01:45 PM

Edit this format in the live tester →

In Python

from datetime import datetime
dt = datetime(2026, 6, 18, 13, 45, 30)
dt.strftime("%m/%d/%Y %I:%M %p")
# => "06/18/2026 01:45 PM"

Directives used

%mMonth as a zero-padded number (01–12).06
%dDay of the month, zero-padded (01–31).18
%YYear with century as a decimal number.2026
%IHour (12-hour clock), zero-padded (01–12).01
%MMinute, zero-padded (00–59).45
%pLocale’s equivalent of AM or PM.PM

Related formats