HI,
Can I have the tool to know whether the date/time read in is either AM or PM?
AM or PM designation?
Hi @Archaeopteryx
Do you really have to use the DateTime tool?
Using the DateTimeParse function, you can specify AM/PM with the "%X" parameter.
Cheers,
Hi
and thank you for the reply. Can you elaborate? 'How' to use the %X parameter? I have Particle status.
Example: String date as 05/12/2018 01:45 AM
DateTimeParse([Field1],"%d/%m/%y %I:%M %p")
%I for hours to 00 to 12, %M for minutes and %p to AM/PM.
You can have a list of parameters here in this link: https://help.alteryx.com/9.5/Reference/DateTimeFunctions.htm
Hello there @Archaeopteryx and @Thableaus
Touching again on this subject, here is a sample of how to parse date time coming in 12 hour format with the AM/PM specifier; please note that when the specifier is on PM, it adds 12 hours to the parsed date time.
I guess that the key to it is to use the %I and %P specifiers on the format side of the formula's parameters.
Hi @Thableaus how can i convert this date 05/22/2023 14:16:14 into 05/22/2023 02:16:14 PM using DateTimeParse formula?