Best answer

How do I use the time formatter to get 12 hour time (AM / PM) from 24 hour time

  • 18 January 2023
  • 4 replies
  • 3002 views

Userlevel 1

Is there anything I can do with the Date/Time formatter to get YYYY MM DD HHA:mm (12 hour am pm time) from YYYY-MM-DDTHH:mm:ssZ (24 hour time from Outlook) ?

*edit* time format above should be YYYY - MM - DD T HH : mm : ssZ (added spaces to avoid emoji above)

This article mentions that I can input an “A” in the To Format field to get AM/PM, but I don’t see this in my format options and I can’t figure out how to input custom formats. 

I really don’t want to have to use another formatter step to extract the 24 hour clock time and then another step to calculate the 12 hour time if possible… 

Please help!

icon

Best answer by Troy Tessalone 18 January 2023, 22:58

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

Hi @geneva 

Good question.

You can use the Custom option to specify your desired format in the Formatter step.

 

https://help.zapier.com/hc/en-us/articles/8496257974029-Modify-date-and-time-formats-in-Zaps

Userlevel 1

Hi @Troy Tessalone ! Thanks for your reply.

That helps, but I still can’t get the am pm time correct. 

When I tried with MMMM DD YYYY HHA:mm 

I get February 10 2023 14PM:00 from 2023-02-10T19:00:00Z, when it should be 2pm.

If I put the A at the end I get February 10 2023 14:00 PM

 

Do you know how to get the AM/PM time right?

Userlevel 7
Badge +14

@geneva

Try just ha

Reference: https://help.zapier.com/hc/en-us/articles/8496257974029-Modify-date-and-time-formats-in-Zaps#date-time-custom-value-table-0-2

 

Userlevel 1

Yes! You’ve got it @Troy Tessalone 

MMMM DD YYYY h:mm A got me what I wanted:  February 10 2023 2:00 PM

Thanks a lot!