I have written the following function. The exact details are not important. (it gives a Jewish date in words for a civil date based on the site calmath that Hans sent me to)/
The problem is that when I enter the variable dtdate and call the function it only works if I surround the variable with ## –
If I call FCivil2HebFromDate (4/5/2003) I get the incorrect answer
BUT if I call FCivil2HebFromDate (#4/5/2003#) it works. that variable is declared as a date.
Should it need the extra # when I call it?
Thanks
Function FCivil2HebFromDate(dtdate As Date, Optional blaftersh3 As Boolean)
Dim iyear As Integer
Dim imonth As Integer
Dim iday As Integer
Dim blaftersh2 As Boolean
blaftersh2 = blaftersh3
iyear = DatePart(“yyyy”, dtdate)
imonth = DatePart(“m”, dtdate)
iday = DatePart(“d”, dtdate)
FCivil2HebFromDate = Fcivil_hebrew(iyear, imonth, iday)
End Function