Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

VBA-Excel: Date-Time Functions – IsDate()

Description: 

The IsDate() func­tion deter­mines whether expres­sion can be con­verted into date and  returns the Boolean value based upon that.

Format:

IsDate(expression)

Arguments:
  • expres­sion
    • Manda­tory
    • Val­i­date whether expres­sion can be con­verted into date.


Exam­ple:

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()

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: