Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : $CREATE_DATE

$CREATE_DATE
Converts a string with a specified format to a value of semantic type date. (F)
Invocation
date = $CREATE_DATE(pic_string, date_string)
 
The date format to be used. Its syntax is C (fixed-length character string), UN (Unicode), or V (variable-length character string).
The string that is to be converted. Its format must be the same as the format given in pic_string. Its syntax is C, UN, or V.
Usage Notes
One‑ or two‑digit week # (of year), with no leading 0.
Two‑digit week # (of year).
Two‑character quarter.
Two‑digit century.
/ \ ; : , . * - blank
A week is defined to begin on a Monday and end on the following Sunday. However, January 1st always begins week one, regardless of where it falls in the week, and week two starts on the following Monday.
You can specify just a portion of a date field within your mask (for example, entering only MMMM displays the month). Partial date occurrences cannot be accessed using a GET or FORALL statement, as the data cannot be interpreted as a complete date. At least the year portion of a date must be present in the mask to make it accessible to these statements.

Exceptions
 
Signaled if date_string does not match pic_string.
Signaled if pic_string contains invalid characters, or if it is not in a valid date format.
Example
The following rule:

 
COPY_EMPLOYEE;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ FORALL EMPLOYEE : | 1
_ EMPLOYEE_DATE.* = EMPLOYEE.*; |
_ EMPLOYEE_DATE.HIRE_DATE = $CREATE_DATE('YYYY/DD/MM', |
_ EMPLOYEE.HIREDATE); |
_ INSERT EMPLOYEE_DATE; |
_ COMMIT; |
_ END; |
_ ---------------------------------------------------------------------------

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved