IsValidDate

Returns a boolean, the value of which is determined by whether a given date value is a valid or invalid UTC date. An optional parameter can be included to check if the date is in an Hours of Operation calendar, for example you may want to check if the given date is a working day.

Syntax

IsValidDate()

Enabled For

For a description of the business object categories, see Notes on "Enabled For".

Business Object Category Yes/No
Business Rules: Before-Save Rules Yes
Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) Yes
Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) Yes
Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) Yes
Business Rules: Editing Rules Yes
Business Rules: Initialization Rules Yes
Business Rules: Read Only Rules Yes
Business Rules: Required Rules Yes
Business Rules: Validation Rules Yes
Client Expressions No
Object Permissions No
Services No
LDAP No
Mobile No
Quick Actions (except UI Quick Actions) Yes
UI Quick Actions No
Reports Yes
Search/Dashboard without field references No
Search/Dashboard with field references No

Parameters

Parameter Description
utcDateTime Date that must be in UTC. The date you want to check is valid.
hopIdOrName (Optional) The name or the ID of an Hours of Operation calendar.

Return Value

Boolean value.

If the utcDateTime parameter is valid the function returns True, otherwise False if invalid.

If the hopIdOrName parameter is included and the date is valid for the calendar (the date falls into a date in the calendar), then the function returns True, otherwise False if invalid (the date does not fall into a date in the calendar).

Example

$(IsValidDate(2022-05-07))

 

If 2022-05-07 is a valid UTC date the returned value is True, otherwise False if the date is not a valid UTC date.

$(IsValidDate(2022-05-07, "Weekday Working"))

If 2022-05-07 is a valid UTC date and the date is in an Hours of Operation calendar named "Weekday Working", the returned value is True, otherwise False if not in the calendar, or the date is not a valid UTC date.