Syntax
ROUNDTIME(<date>;<string, using a time constant>)
...
Time unit | Constant |
---|---|
Day | d |
Hour | h |
Minute | m |
Second | s |
Limitation
This function can't be applied to an empty value. If a column contains empty values, consider adding a check for this, e.g.
IF(ISBLANK(#DateColumn); null; ROUNDTIME(#DateColumn; "1d"))
Examples
Date | Time constant | ROUNDTIME returns |
---|---|---|
Jan 12, 2013 08:33:12 | 7d | Jan 7, 2013 12:00:00 AM |
Jan 12, 2013 08:33:12 | 3h | Jan 12, 2013 06:00:00 AM |
Jan 12, 2013 08:33:12 | 10m | Jan 12, 2013 08:30:00 AM |
Jan 12, 2013 08:33:12 | 5s | Jan 12, 2013 08:33:10 AM |
...