Thank you for your help. But I have tested the below and it does not work - I reported this in a bug report - the month always comes up as Jan. no matter what date I specify.
'this doesn't work correctly
DateTime.DateFormat = "mm/dd/yyyy"
Dim dt1 As Long
dt1 = DateTime.DateParse("09/22/1949")
DateTime.DateFormat = "dd MMM yyyy"
Log(DateTime.Date(dt1))
Here is what I have in a test program:
Sub Activity_Create(FirstTime As Boolean)
Dim dt1, dt2 As Long
DateTime.DateFormat = "mm/dd/yyyy"
dt1 = DateTime.DateParse("09/22/1949")
dt2 = DateTime.DateParse("4/6/1965")
DateTime.DateFormat = "dd MM yyyy" 'this should be MMM, not MM
Log(DateTime.Date(dt1))
Log(DateTime.Date(dt2))
End Sub
The result is seen in the attached picture file.
NOW, WAIT, I changed:
DateTime.DateFormat = "mm/dd/yyyy"
to
DateTime.DateFormat = "MM/dd/yyyy"
and you see the difference it made.
I could have sworn that 'mm' meant months as a number. Guess I am too used to PHP.
Sorry to bother you - thanks for your help.