Skip to main content
November 15, 2021
Question

How to get the zeroth time for the current day?

  • November 15, 2021
  • 4 replies
  • 0 views

I am trying to find a sail expression that will return the current day's timestamp at the first second of the day.

For example:

now() returns 11/15/2021 4:39 PM EST

Looking for something along the lines of: 

myFunc(now()) returns 11/15/2021 12:00 AM EST

I tried 

now()-hour(now())/24-minute(now())/(24*60)-second(now())/(24*60*60) but it returns 11/14/2021 7:00 PM EST(Date and Time)

Any help will be appreciated, 

4 replies

danny.verb
November 15, 2021

todatetime(today())

November 15, 2021

 Thank you for your response, I tried this but it returns 11/14/2021 7:00 PM EST(Date and Time with Timezone), where I'm expecting 11/15/2021 12:00 AM EST. I tried wrapping it around a local(todatetime(today()),"America/New_York") but returns 11/14/2021 2:00 PM EST(Date and Time)

November 15, 2021

gmt(todatetime(today()))

[View:https://docs.appian.com/suite/help/21.4/fnc_date_and_time_gmt.html]