How to change a currennt date time

Dear Community:

I am trying to transform a current date and time to a date and time value rounded to the lower hour, that is: If the current date and time is 09/03/2021 10:42:13, in the app field it should be written 09/03/2021 10:00:00.
Some of you know how to do it. Thank you in advance for your help.

Regards.

0 4 199
4 REPLIES 4

Easiest way I’ve always done this is to build out the time manually and convert it into a temporal type.

DateTime(
  concatenate(
    Date(today()), 
    " ",
    hour(TimeNow() - "00:00:00"), 
    ":00:00"
  )
)
  • Alternatively, replace instances of today() or timenow() with date/time columns.

Thanks a lot @MultiTech_Visions!!!
Just one detail. I had to make a little adjustment to the HOUR formula for it to work:
HOUR (TIMENOW () - “00:00:00”).
Thanks again!

Yup, my oversight: HOUR() needs a duration, not a time. (I’ve updated the original post)

  • Good catch! 3X_d_5_d51363a862e7ab883241c312ac5d7f271579cdd3.gif

BTW happy cake day!!!

Perfect. Thanks!

Top Labels in this Space