# MDY 12-Hour Datetime

Key: `datetime.timestamp.mdy_12h`

Month/Day/Year datetime with 12-hour clock and AM/PM indicator. Month-first ordering (MM/DD/YYYY).

Page: <https://meridian.online/docs/projects/finetype/types/datetime/timestamp/mdy_12h>

Format: `%m/%d/%Y %I:%M %p`

Samples: `01/15/2024 10:30 AM`, `12/31/2019 11:59 PM`

## Background

### Origin

In traditional American usage, dates are written in the month–day–year order.[[1]](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States) The slash is the most commonly used separator in the all-numeric form of an American date.[[1]](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States) The United States uses the 12-hour clock almost exclusively, in writing as well as in speech.[[1]](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States) In American written usage the suffixes a.m. and p.m., often represented as AM and PM, are appended universally.[[1]](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States) The 24-hour clock is used in military, public safety and scientific contexts in the United States.[[1]](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States) The mdy\_12h timestamp is best read as these everyday American habits written down together, rather than as the product of any one standard. (Meridian's view)

The abbreviation a.m. comes from the Latin ante meridiem, before midday, and p.m. from post meridiem, after midday.[[2]](https://en.wikipedia.org/wiki/12-hour_clock) NIST's Times of Day FAQs say that 12 a.m. and 12 p.m. are ambiguous and should not be used.[[3]](https://www.nist.gov/pml/time-and-frequency-division/times-day-faqs) NIST suggests specifying an event as occurring on a particular day at 11:59 p.m. or 12:01 a.m. to avoid ambiguity.[[3]](https://www.nist.gov/pml/time-and-frequency-division/times-day-faqs) By convention, 12 a.m. denotes midnight and 12 p.m. denotes noon.[[2]](https://en.wikipedia.org/wiki/12-hour_clock) The style manual of the United States Government Printing Office once used 12 a.m. for noon and 12 p.m. for midnight, though this was reversed in its 2008 editions.[[2]](https://en.wikipedia.org/wiki/12-hour_clock)

### Use

In .NET, the general date short time (g) format for the en-US culture displays 6:30 in the morning of 10 April 2008 as 4/10/2008 6:30 AM.[[4]](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings)

Python's documentation notes that when used with strptime, the %p directive only affects the output hour field if the %I directive is used to parse the hour.[[5]](https://docs.python.org/3/library/datetime.html) Python's documentation gives AM and PM as the en\_US values of %p and am and pm as the de\_DE values.[[5]](https://docs.python.org/3/library/datetime.html) Parse the hour with %I and %p together rather than with %H. (Meridian's view)

## Sources

1. [Date and time notation in the United States](https://en.wikipedia.org/wiki/Date_and_time_notation_in_the_United_States) — secondary source
2. [12-hour clock](https://en.wikipedia.org/wiki/12-hour_clock) — secondary source
3. [Times of Day FAQs](https://www.nist.gov/pml/time-and-frequency-division/times-day-faqs) — organisation
4. [Standard date and time format strings - .NET](https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings) — documentation
5. [datetime — Basic date and time types](https://docs.python.org/3/library/datetime.html) — documentation
