Script functions reference > Script functions in alphabetical order > D > DtisoFormat

DtisoFormat
Syntax
DtisoFormat(source, format, timezone);
source
format
"MM/DD/YYYY" if source string is "09/15/2007", or
"DD-MM-YY" if source string is "15-09-07"
"{date{<date>}{<internediate character>}time{<time>}}"
where 
<date> is the date format of the source string and contains YYYY or YY for the year, MM for the month, and DD for the day.
<time> is the time format of the source string and contains HH for the hour and MM for the minute.
<internediate character> is the separator between the date and time, for example blank space.
"{date{MM/DD/YYYY}{ }time{HH:MM}}" if source string is "09/15/2007 12:30"
timezone
A string containing timezone (e.g. "+01:00" or "-01:00"). A return value including both date and time will be shifted according to the specified timezone. If you do not want to specify the timezone, you can specify an empty string,"". If you specify a timezone value for date conversion only, it will be ignored.
Description
Converts date and optionally time to an ISO 8601 format which is required in the StreamServe repositories.
Returns
A date and time formatted according to ISO 8601 standard.
Example
$formatteddatetime = dtISOFormat("24-06-2007 09:30", "{date{DD-MM-YYYY}{ }time{HH:MM}}", "+01:00"
Returns:
$formatteddatetime = "2007-06-24T08:30:00"
OpenText StreamServe 5.6 Updated: 2013-03-01