Link to home
Start Free TrialLog in
Avatar of aneilg
aneilgFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL Dates

I cannot convert nvarchar(25) to datetime.
201503171512

I need to create two columns
datetime dd-mm-yyyy-mmmm - 15-Mar-2015-1512

second column named time
1512 pm.

i've tried CONVERT(nvarchar(25),CONVERT(DATE,column,106),103) AS AdmittedDatetime,


thanks.
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

You need to have the column in this format: '20150317 15:12'
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aneilg

ASKER

thanks guys.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aneilg

ASKER

thanks.