isDate

isDate()

Overview

The isDate() function takes an expression as an argument, and returns true if it is a valid date-time value. Otherwise, it returns false.    

Return Type

  • BOOLEAN

Syntax

<variable> = isDate(<expression> );
(or)
<variable> = <expression>.isDate();
ParameterData typeDescription
<variable>BOOLEANVariable which will contain the returned boolean value.
<expression>-

The expression which needs to be checked.     

Text values containing a valid date-time value will return true, and which do not contain a valid date-time value will throw an error.

List and key-value data type will return a null value.

Examples

dateString="01-Jan-2019";
 dateValue='01-Jun-2020';
 numValue=100;
 
 boolValOne=isDate(dateString);//returns true
 boolValTwo=isDate(numValue);// returns false
 boolValThree=dateValue.isDate();// returns true

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com