Skip to main content
New Participant
Nov 15, 2021 9:57 PM UTC
Question

How to get the zeroth time for the current day?

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
Employee
Nov 15, 2021 10:10 PM UTC

todatetime(today())

New Participant
Nov 15, 2021 10:20 PM UTC

 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)

Participating Frequently
Nov 15, 2021 10:22 PM UTC

gmt(todatetime(today()))

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