Skip to main content

dateTimeLocalToUTC()

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 local date and time to UTC timestamp
function NewOrder(five: Five, context: any, result: FiveError): FiveError {
context.new.OrderTimeStamp = five.dateTimeLocalToUTC(context.new.OrderDateTime);
return five.success();
}