Mega Code Archive

 
Categories / VisualBasic Script / Date Functions
 

Format the date type value

Sub FindDates()     On Error GoTo errorHandler     Dim startDate As String     Dim stopDate As String     startDate = Format("12/12/1900", "mm/??/yy")     stopDate = Format("12/12/2000", "mm/??/yy")     MsgBox startDate         End     errorHandler:     MsgBox "There has been an error:  " & Error() & Chr(13) _         & "Ending Sub.......Please try again", 48 End Sub