If it is recognized by VBA as a date, the cdate or cvdate functions should work. If the string does not look like a recognizable date, for instance 122804, you may have to use some of the string manipulation functions to retrieve parts of the string:
Thanks for all your help but I still can't seem to get this to work: I'll give a fuller explanation of what I'm trying to do:
I am running the following stored procedure from vba. I get an error when I try to open the query and I have concluded that it is the dates that are causing the error.
There is a userform with drop downs and text boxes to select the input for the stored procedure. The from date and to date are both free entry fields.
Here is the stored procedure with their data types.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.