Example:
GTM> WRITE $H,!,$ZDATE($H) 55243,43223 04/01/2002 GTM>
This displays $HOROLOG and then uses $ZDATE() to display today's date. The output shown would appear if today were the first of April, 2002.
Example:
GTM> W $ZDATE($H,"DD-MON-YEAR") 01-APR-2002 GTM>
This uses the second argument to specify a text format different from the default.
Example:
GTM> SET m="Januar,Februar,Marz,April,Mai,Juni,Juli,August," GTM> SET m=m_"September,October,November,Dezember" GTM> WRITE $ZDATE($H,"DD-MON-YEAR",m) 01-April-2002 GTM>
This is similar to the prior example, however it uses the third argument to specify the months in German.
Example:
GTM> SET d="Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi" GTM> WRITE $ZD($H,"DAY, DD/MM/YY","",d) Mercredi, 01/04/2002 GTM>
This example displays the first of April, however it uses the fourth argument to specify the days of the week in French.
Example:
GTM> WRITE !,$ZDATE($H,"12:60:55 AM") 10:35:51 PM GTM>
This example shows hours, minutes, and seconds in a 12 hour clock with an AM/PM indicator.
Example:
GTM> WRITE !,$ZDATE(",36524","24-60") 10-08 GTM>
This example shows hours and minutes on a 24 hour clock. Notice that the first argument must provide the time in the second comma delimiter piece to match $HOROLOG format.
Example:
GTM>WRITE $ZDATEFORM 0 GTM>WRITE $ZDATE($H) 11/15/02 GTM>SET $ZDATEFORM=1 GTM>WRITE $ZDATE($H) 11/15/2002 GTM>WRITE $ZDATE($H,"MM/DD/YY") 11/15/02
This example converts the output format for years from the default ("YY") format to the four digit format ("YYYY") using the Intrinsic Special Variable $ZDATEFORM.