Function to convert text to date

G

Guest

I have inherited a DB with dates, in the form 13/9/1999 (ie European format),
stored as nvarchar 50!! It's a funny old world..... Is there a function to
convert such things to datetime datatype (the time bit doesn't matter
historically so in the data conversion all would be set to 12:00)
Thanks a lot,
jim
 
J

John Nurick

See my previous post. CDate() will probably work OK if your machine has
European regional settings, but to exclude the possibility of problems
with dd/mm/yyyy versus mm/dd/yyyy, use DateSerial().
 
V

Van T. Dinh

CDate() in Access and if your Back-End is SQL Server ("nvarchar 50" sounds
like SQL Server) and you want to work directly on the SQL Server, use
CONVERT() or CAST().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top