Skip to main content
Known Participant
Oct 11, 2021 1:12 PM UTC
Question

how to create local date and set time as 12:00 AM

Hi All, 

I have to create a local date and set the time as 12:00 Am, For eg, if I am in the CST timezone and today date is 10/11/2021 then the date time should be 10/11/2021 12:00 AM CDT

    4 replies

    stefanhelzle0001
    Brainy
    Oct 11, 2021 1:27 PM UTC

    userdatetime(
          year(today()),
          month(today()),
          day(today()),
          12,
          0,
          0
        )

    Known Participant
    Oct 11, 2021 1:37 PM UTC

    thank you. it works

    Participating Frequently
    Oct 11, 2021 1:28 PM UTC

    You can use a combination of todatetime() and gmt() in this case.

    gmt(todatetime(today() & " 12:00 AM"), usertimezone(loggedInUser()))

    Known Participant
    Oct 11, 2021 1:37 PM UTC

    Thank you, this one too works [emoticon:c4563cd7d5574777a71c318021cbbcc8]