Skip to content

Date

See Also: Time and Date Functions, Type Conversion Functions, Round, String Function, String, DateTime

Purpose

The Date function returns a value of type Date regardless of the type of the passed value.

Return Type

Date

Syntax

(Date( {expression} ))

What It Does

The Date function converts the {expression} into a date.

In this example, the string "03/01/2020" is converted to the date 03/01/2020 and moved to the date variable dDate.

String s
Date dDate
Move "03/01/2020" to s
Move (Date(s)) to dDate

Dates are stored as Julian numbers. Julian dates are integers equal to the number of days from Day 1, Year 0 to the date.

In this example, the integer (738650) is converted to the date 04/25/2022 (April 25, 2022) and moved to the date variable dDate.

Date dDate
Move (Date(738650)) to dDate

Note

  • It is not always necessary to convert numbers, strings, or other types to date. Most date calculations can be performed directly on number or integer values.