Skip to main content

Need to Figure Out 24 Hours Prior of Date Time

  • July 1, 2021
  • 2 replies
  • 28 views

Forum|alt.badge.img+7

I have a time where an event starts and I want to set a tweet for each event 24 and 12 hours prior. Problem is when I use a formula for the Date -1 it gives me the right date but the time defaults to 12am and if I switch to not same timezone for all it moves it to the day before.

Either way I want to be able to say event is 7/1/2021 at 10pm gmt. and I need a cell to tell me the time for the 12 hour or 24 hour tweet so I can run a NOW calc against it in the view to trigger the tweet.

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+2
  • Inspiring
  • July 1, 2021

Hi Jason. Try this for subtracting 12 hours…

DATETIME_FORMAT(
SET_TIMEZONE(
DATEADD({your date},-12,‘hour’),
‘America/New_York’),
‘MM/DD/YYYY h:mm a’)

Remember to replace ‘America/New_York’ with your specific time zone.


Forum|alt.badge.img+7
  • Author
  • Known Participant
  • July 1, 2021

Hi Jason. Try this for subtracting 12 hours…

DATETIME_FORMAT(
SET_TIMEZONE(
DATEADD({your date},-12,‘hour’),
‘America/New_York’),
‘MM/DD/YYYY h:mm a’)

Remember to replace ‘America/New_York’ with your specific time zone.


You are my Hero!!!