Hello,
In some countries, such date is 12.12.06 but in other countries it is like 12/12/2006. I did a feature on all my dates to settle the problem. This is a part of my code
My concern is that in a SQL query in VBA which manages the date format, I do not always found a result for it.Public Function MyDate(atthe date As Date) As Date
MyDate = Format(atthe date, "dd \ / mm \ / yy")
End Function
Here is the query:
I am excepting an help from you guys.sSQL = "field SELECT FROM table" & _
"WHERE ((productId =" & & LProduct ") AND (date <= #" & MyDate(dDateTR) & "#) AND (date2> = #" & MyDate(dDateTR) & "#)) ;"
Bookmarks