Date Operations
CanParseAsDate()
This function checks whether a text value can be interpreted as a date value.
Return type: Boolean
Parameter | Data Type | Description |
|---|---|---|
1* | Text | Value to be checked |
2 | Text | Pattern of the date format structure (optional) The syntax is analogous to the syntax of the property |
Examples
CanParseAsDate("2025-12-31") returns TRUE.
CanParseAsDate("12/31/2025") returns FALSE (for German country setting in the operating system).
CanParseAsDate("12/31/2025", "MM/dd/yyyy") returns TRUE (regardless of country setting).
GetDate()
This function generates a date value based on certain specifications. If the defaults are empty, the function returns the current date instead.
Return type: date
Parameter | Data Type | Description |
|---|---|---|
1 | Number | Year of the date value to be created |
2 | Number | Month specification (1 to 12) of the date value to be created |
3 | Number | Day specification (1 to 31) of the date value to be created |
Examples
GetDate(2025, 12, 31) returns 2025-12-31 00:00:00.
GetDate() returns the current date and time.
DateAdd()
This function adds a value to a date and returns the modified date. If a negative value is specified, this value is subtracted from the date.
Return type: date
Parameter | Data Type | Description |
|---|---|---|
1* | Date | Date value to be modified |
2 | Number | Number of time units to be added Default value: |
3 | Text | Time unit of the value to be added:
|
Examples
DateAdd(2025-12-31, 14) returns 2026-01-14 00:00:00.
DateAdd(2025-12-31, 2, "Month") returns 2026-02-28 00:00:00.
GetDatePart()
This function reads a partial value from a date.
Return type: number
Parameter | Data Type | Description |
|---|---|---|
1* | Date | Underlying date value |
2 | Text | Type of value to be read:
|
Examples
GetDatePart(2025-12-31, "Month") returns 12.
GetRandomDate()
This function returns a randomly generated date value.
Return type: date
Parameter | Data Type | Description |
|---|---|---|
1* | Date | Lower limit of the value range Default value: |
2 | Text | Upper limit of the value range Default value: |
Examples
GetRandomDate(2025-01-01, 2025-12-31) returns a date value within the year 2025 (e.g., 2025-11-25 00:00:00).
IsDate()
This function checks whether a value is of the data type "Date."
Return type: Boolean
Parameter | Data Type | Description |
|---|---|---|
1* | (variable) | Value to be checked |
Examples
IsDate(2025-12-31) returns TRUE.
IsDate("2025-12-31") returns FALSE.
ParseAsDate()
This function converts a text value to a date value.
Return type: date
Parameter | Data Type | Description |
|---|---|---|
1* | Text | Value to be converted |
2 | Text | Pattern of the date format structure (optional) The syntax is analogous to the syntax of the property |
Examples
ParseAsDate("12/31/2025", "MM/dd/yyyy") returns 2025-12-31 00:00:00.
ParseAsDate("12/31/2025") returns 0001-01-01 00:00:00 (an "empty" date, as the date cannot be interpreted in the operating system with German country settings).