Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

How to format date for 'send Slack message' automation action

Topic Labels: Dates & Timezones
2508 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Stephanie_Druck
4 - Data Explorer
4 - Data Explorer

Hello,

I use Airtable for editorial management. I’ve created an automation that will send a Slack message to my team when a story is published or scheduled to be published. I would like the message to include the information (date and time) for when the story was published or is scheduled for. I know how to set up the trigger, action, and various other pieces of information I want the message to include — the part I’m struggling with is how to format the date and time for Slack.

I found an article from Slack about how to format dates. I also found this Airtable community discussion about formatting dates for automated email actions. So combining the two, I wrote:

Publication details: <!date^DATETIME_FORMAT(SET_TIMEZONE({Publication Date}, 'America/Chicago')), 'M/D/YYYY at h:mm')>

But it’s still not displaying correctly. I’ve also created a formula field that converts my publication date field to unix time and then I tried to insert that string into what I’ve written above, but that didn’t work either.

Hope someone out there knows the answer! Thanks in advance! :slightly_smiling_face:

1 Reply 1
David_Bjorgen
5 - Automation Enthusiast
5 - Automation Enthusiast

Have you tried escaping the letter "a" in the word at, like so?

 

DATETIME_FORMAT(SET_TIMEZONE({Publication Date}, 'America/Chicago'), 'M/D/YYYY \at h:mm')