Hi all, I have next code:
When I run, I have next output: 4:03:08.000 PM 3/16/2022. Does anyone know why I have a "4" at the beginning of the output? How can I fix it?
Thanks for any help
Solved! Go to Solution.
What time are you expecting?
Are you using UTC time or local time?
Are you using daylight saving time?
Your format string should be:
%<%m/%d/%Y %I:%M:%S %p>T
I'm not sure why it causes 4 PM but I think "%h" is wrong. Lower case h isn't listed in the format codes so it's hard to know what it's doing. Since you have 12 hour time you probably want "%<%m/%d/%Y %I:%M:%S %p>T" as your format string. %I is 12 hour time, %p grabs the AM/PM.
Thank you George, problem fixed. After reading help, I found %I is for 12-hours format and %p is for AM PM flag. Thank you again.