This function is only available when the source or target server is Service Now. It is used to convert a Date/Time value representing a duration into a formatted string: <days> <hours>:<minutes>:<seconds>
In Service Now, a duration is stored as a date/time. The base date/time,1970-01-01 00:00:00, is offset by the number of days, hours, minutes and seconds in the duration. This timestamp should be the parameter for the function.
The function will extract the number of days, hours, minutes and seconds from the date/time and construct the duration string.
Examples:
DATETIME_TO_SN_DURATION_STR('1970-01-13 10:45:30') = '12 10:45:30'
DATETIME_TO_SN_DURATION_STR('1970-01-01 10:45:00') = '0 10:45:00'
DATETIME_TO_SN_DURATION_STR(NULL) = '0 00:00:00'
Comments
0 comments
Please sign in to leave a comment.