Is there a function that works in both MS Access and SQLServer 2k5+ that will convert a string to a date? It seems CDate works in access and Convert works in SQLServer, but I’d like a function that works in both.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is important to remember that SQL and Access are not running on the same platform and you will not have access to the same functions in each platform. This is like asking if you can use an echo command in ASP.NET. Echo works in PHP but not .NET languages. I do not believe you will find a common function you can use.
I would however consider simply storing the value as a date so no conversion needs to occur in the first place.
in SQL…
Access…
Further reading: