Hi guys,
I’m trying to format (in UTC) a dateTime insert / update to the next hour.
E.g. if it’s currently 05.43.32 (hour-minute-seconds) I’d like to format current dateTime’s time to 06.00.00.
I’m sure it’s possible, so wondering if anyone has any ideas/solutions for this?
I’m using Node/MariaDB.
Matt
Teodor
2
Hi, you can use the date add formatter to add +1 hour and then apply a date format HH:00:00
Example:
{{NOW.dateAdd('hours', 1).formatDate('HH:00:00')}}
Amazing, worked perfectly. Thank you !
As an aside, you can also find the nearest full hour using the same technique but adding 30 mins.
So 5.25 becomes 5, 5.35 becomes 6