Skip to main content

dateTimeUTCToLocal()

Last updated 10/09/2024

Example

The following code executes before a new row is inserted into a table and converts UTC to the local date and time in the OrderDate field.

Convert the UTC timestamp to local date and time
function NewOrder(five: Five, context: any, result: FiveError): FiveError {
context.new.OrderDate = five.dateTimeUTCToLocal(five.now());
return five.success();
}