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