Be the first user to complete this post
|
Add to List |
VBA-Excel: Date-Time Functions – IsDate()
Description:
The IsDate() function determines whether expression can be converted into date and returns the Boolean value based upon that.
Format:
IsDate(expression)
Arguments:
- expression
- Mandatory
- Validate whether expression can be converted into date.
Example:
Function FnIsDate() Dim strDate Dim strInvalidDate strDate = "12-July-2013" strInvalidDate = "12000-11-1111111" MsgBox "'12-July-2013' can be converted into Type Date: " & IsDate(strDate) & vbCrLf & "'12000-11-1111111' can be converted into Type Date: " & IsDate(strInvalidDate) End Function
Also Read:
- VBA-Excel: String Functions – Trim()
- VBA-Excel : Strings Functions – InstrRev
- VBA-Excel: Date-Time Functions – TimeSerial() and TimeValue()
- VBA Excel - Cells, Ranges and Offset: Refer to Cells by Using Shortcut Notation
- VBA-Excel: Fill Excel Range Values in a 2D Array