DateTimeFormat (Magic xpi 3.x)
Constructs an XML DateTime value or a JDE Julian Date value from an input date, time, and time zone.
Syntax:
|
DateTimeFormat(Date date, Time time, Alpha timezone, Numeric format)
|
Parameters:
|
date: A date expression.
time: A time expression.
timezone: Time zone relative to GMT.
|
|
format (numeric):
|
1. YYYY-MM-DDThh:mm:ssTZD (XML format).
|
|
|
2. CYYDDD (JDE Julian format), where C is the century (0=1900 and 1=2000), YY is the year and DDD the day of the year. Since version: V3.2 SP2a
|
Returns:
|
DateTime string in required format.
|
Examples:
|
XML format:
|
DateTimeFormat('29/04/2008'Date, '10:45:30'Time, '+05:30',1) returns 2008-04-29T10:45:30+5:30.
|
|
JDE Julian format:
|
DateTimeFormat('22/03/2011'Date, '','',2) returns 111081.
|
See also:
|
|