T
TimH
I am attempting to convert a Short date entry to a string "00000000-"
Have tried many variations of the following without success:
Public Sub Build_VisitDate()
Dim strTmp As String
Dim dtVisitDate As Date
Dim Build_VisitDate As String
strTmp = InputBox("Enter Visit Date", "Visit Date")
dtVisitDate = Format(CLng(dtVisitDate), "00000000-")
Debug.Print dtVisitDate
End Sub
all I get is either 12:00:00
or
mm/dd/yyyy
not the desired "eight digit string and -"
Have tried many variations of the following without success:
Public Sub Build_VisitDate()
Dim strTmp As String
Dim dtVisitDate As Date
Dim Build_VisitDate As String
strTmp = InputBox("Enter Visit Date", "Visit Date")
dtVisitDate = Format(CLng(dtVisitDate), "00000000-")
Debug.Print dtVisitDate
End Sub
all I get is either 12:00:00
or
mm/dd/yyyy
not the desired "eight digit string and -"