This function converts a number to an ITP date number. This ITP date number, then, can be used in all ITP's data functions.
number_to_date ( input_number; date_mask )
The result of this function is of type NUMBER; an ITP date number that has the format YYYYMMDD.
This function has two parameters:
In the mask the location and the number of digits used to encode the year, the month and the day, are shown by using Y for a year digit, MM for the months digits and DD for the day digits.
To indicate the year you can use three kinds of indications in the mask:
For example 120501 as input with the mask MMDDYY tells us that the date is the fifth of December 2009; 12 is the month, 05 the day and 01 is the year from 2000.
Example
@( number_to_date( 120501; "MMDDYY" ) )
Result: 20,011,205.00
@( number_to_date( 1209305; "MMYYYDD" ) )
Result: 19,931,205.00
@( number_to_date( 1219305; "MMYYYDD" ) )
Result: 20,931,205.00
@( number_to_date( 19930512; "YYYYDDMM" ) )
Result: 19,931,205.00
Note that the construction @ ( ) around the function means that the result of the function is displayed in the text. This construction must be used in a text part of a model document. The switch from ITP mode to text mode in a model document is made with the # characters. An ITP model document starts in text model, the #BEGIN makes the switch to ITP mode.