Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

How to remove minutes from current time?

Hi,

There is the column which type is a DateTime, and the initial value is now(). How to remove minutes from current time?

ex) 2024-07-03 15:33   =>   2024-07-03 15:00

Thanks.

Solved Solved
0 6 194
1 ACCEPTED SOLUTION

DATETIME(
DATE(NOW()) & " " &
TEXT(HOUR(TIME(NOW()) - "00:00:00")) & ":00:00"
)

View solution in original post

6 REPLIES 6

subtract the minute. 

example

DATETIME((NOW()-MINUTE(NOW()))

@jaichith  Thanks your reply.

It does' t work.
There is an error message: Parameter 1 of function MINUTE is of the wrong type.

Thanks.

DATETIME(
  DATE(NOW()) & " " &
  TEXT(HOUR(TIME(NOW()) - "00:00:00")) & ":00:00"
)

DATETIME(
DATE(NOW()) & " " &
TEXT(HOUR(TIME(NOW()) - "00:00:00")) & ":00:00"
)

It works. Thank you so much.

Welcome !!!😊

Top Labels in this Space