dateTimeUTCToLocal()
Last updated 14/02/2024
Example
The following code executes before a new row is inserted into a table and converts the local date and time to UTC.
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();
}
Convert the UTC timestamp to local date and time
function NewOrder(five, context, result) {
context.new.OrderDate = five.dateTimeUTCToLocal(five.now());
return five.success();
}