I'm new to SQL and have inherited a database which uses nvarchar(50) as the data type for the "Date" column. I want to convert this column into datetime format but I cannot figure out how to do so as I am using SQL CE 4.0 and can only find solutions for SQL.
This is an example in SQL of what I would like to do:
SET DATEFORMAT dmy
alter TABLE [dbo].[tablename]
ALTER COLUMN columnname datetime
I know I will probably need to create a new column and copy/convert the data from the old column into the new one using a query. I just need some guidance on how to do this.
Currently the Date column is in the format "dd/MM/yyyy hh:mm:ss tt".
I have been using Microsoft WebMatrix if that is helpful at all.
Thanks!