I used the "Convert Time Field" to convert text-formatted date/time to a date format in a feature class. For my input time format, I wrote M/d/yyyy H:mm:ss tt.
At first glance, the output time field looked fine, until I noticed that except for times between 12:00 and 1:00 PM, PM is changed to AM. AM times remain AM.
However, while what I describe above is the usual result, much less frequently AM and PM are changed from one to the other. I have yet to determine how often this occurs among the 140,000 records in the file, but it is an extremely rare outcome.
Snippets from the table showing these two results are attached.
Any reason for why the AM/PM mix-ups would happen?
I doubt this will help you much now (it being 2025 and all), but this happened to me, and it's because of the difference between what "H" and "h" mean in the time field.
From the docs:
• hh—Hours with leading zero for single-digit hours and a 12-hour clock
• HH—Hours with leading zero for single-digit hours and a 24-hour clock
So, in my case, and for my dataset, I had interpreted my time field as:
MM/dd/yyyy HH:mm:ss tt
...and I needed to convert it to a data output field type. I thought all looked ok until, as you mention, I compared the AM / PM, and they are reversed. Since my data used a 12 hr clock and I handled the time as a 24 hr clock, my data read in incorrectly (all was ok except for the tt identifier).
So, to fix, I had to change to:
MM/dd/yyyy hh:mm:ss tt
For others who might be in the midst of a nervous breakdown when that happens, hope this helps!