Function to convert text to date

  • Thread starter Thread starter Guest
  • Start date Start 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
 
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().
 
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().
 
Back
Top