![]() |
VOOZH | about |
The VBScript CDate Function is used to convert a valid date and time expression to type Date. It returns the correct order of dates. It recognizes date formats according to the locale setting of your system.
Note: We can also use the IsDate function to determine if date can be converted to a date or time.
Syntax:
CDate(date)
Parameter: This function accepts a single a parameter as mentioned above and described below.
Example 1: Below examples illustrates the VBScript CDate Function.
Output:
5/6/2020
Example 2: Below code illustrates that how to convert numbers with separators to a date:
Output:
4/22/2010