I'm trying to get the month from a date which is in the US format. So in the date 12/01/99 the month would be 12 (not 1). But I can't work it out. What am I doing wrong? Thank you.
Code:ElseIf IsDate(txttestdate.Text) = True Then Dim datval As Date datval = Format(txttestdate.Text, "mmm d yyyy") End If MsgBox "The month is " & Month(datval)




Reply With Quote
