You are here: Functions > NTOD()

NTOD()

NTOD() returns the date represented by the numeric year, month and day specified.

Use NTOD() to construct dates from numeric year, month and day inputs.

Function Format

NTOD(N1,N2,N3)

NTOD() returns the date constructed from:

N1 (4 digit year)
N2 (1 or 2 digit month)
N3 (1 or 2 digit day)

If the constructed DateTime is invalid, then NTOD() returns an invalid date.

Examples

The following are examples of NTOD() using valid and invalid parameters:

NTOD(2012,08,14) = ‘20120814‘

NTOD(2012,08,32) = ‘19000101‘

NTOD(2012,08,14)+NTOT(23,12,32) = ‘20120814 23:12:32‘

The final example above illustrates combining use of the NTOD() and NTOT() functions to construct a complete DateTime field. For more information on constructing the time portion of a DateTime field see NTOT().