The Extract Date and Time elements command extracts years, months, days, hours, minutes and seconds from a variable containing this information in a text format. This information is stored in separate variables allowing the user to use all components of the date as the user pleases.
This command is very useful in combination with the command "Format Local Time".
<code> Extract Date and Time elements lcl_txt, lcl_year, lcl_month, lcl_day, lcl_hour, lcl_min, lcl_sec</code>
This example shows the extraction of date and time elements from the variable lcl_txt. The other variables are named in such a way that it is clear what they are used for.
It is quite easy to construct a date or time from these separate variables. See the example below:
<code>SET gbl_date_txt = lcl_day+"/"+lcl_month+"/"+lcl_year</code>
This examples shows the construction of a date in a format like "1/1/2010" by combining the different numerical variables with the / character into the correctly formatted date.