You are here: Field Types > DateTime > Command Mode Syntax for Numeric Dates

Command Mode Syntax

You can describe the format of dates and/ or times stored in numeric fields using the field modifier NDATE (equivalent to the DateTime field parameter) followed by the DateTime format. For example, to describe a field with numbers in the form 991231 as a date, you would use the NDATE field modifier as shown below:

DEFINE FIELD Datefield NUMERIC 1 6 0 NDATE PIC "YYMMDD"

Note: NDATE is the command line equivalent to the DateTime parameter in the Advanced Field Edit dialog when editing a field definition in the Edit Table Layout tab. It is most commonly used to define dates stored as packed fields.