Be the first user to complete this post

  • 0
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
IsDate()
IsDate()



Also Read:

  1. VBA Excel - Cells, Ranges and Offset : Range
  2. VBA-Excel: Date-Time Functions – Date(), Now() and Time()
  3. VBA-Excel: Create Array using Array() Function
  4. VBA-Excel: String Functions – strComp()
  5. VBA-Excel : 3D-Ranges - Working with Multiple WorkSheets At The Simultaneously
  6. VBA-Excel: String Functions – RTrim()
  7. VBA-Excel: String Functions – String()
  8. VBA-Excel: Arrays – Two Dimension, Dynamic Array