Date functions

About Date functions

You use Date functions to create a date value that you can compare with date or dateTime property values.

today()

Description

Returns the current date with hour, minute, second and millisecond parts set to zero.

Syntax today()
Return Date
Parameters None
Example

The following example returns the current date:

Definition

crtDate: Date = today()

If ACCT_DATE < crtDate Then

// do something

now()

Description

Returns the current DateTime.

Syntax now()
Return Date
Parameters None
Example

The following example returns the current DateTime:

crtTime: Date = now()

toDate(date, format)

Description

Converts a string to a date.

Syntax toDate(date, format)
Return Date
Parameters

date: Date expressed as a string

format: Date format in the Java-style

Examples

The following examples return the 31th December 2011 date in the requested format:

date1 = toDate(“31122011”, “ddMMyyyy”)

date2 = toDate(“31/12/2011”, “dd/MM/yyyy”)

date3 = toDate(“20111231”, “yyyyMMdd”)

Related Links