© Copyright 2023, Astera Software
Name
ToDateTimeOffsetFromDateTime
Syntax
ToDateTimeOffsetFromDateTime (Date dateTime, TimeSpan offset)
Purpose
To return date time with offset value after conversion.
Description
Converts specified date time value to a date time with offset value.
Return Type
DateTimeOffset
Parameters
dateTime [System.DateTime] – Date which will be converted to datetime with offset
offset [System.TimeSpan] – Offset which will be added to datetime with offset
Example
In this example, we will pass a date time value to the function transformation object using a Variables object.
Where,
dateTime = 07/18/2022 05:09:17 PM
offset = 4:00
In the output window, you can see that the provided date time value has been converted to a date time offset value, of the specified offset value.