Convert NVARCHAR to DATETIME in SQL Server 2008 -


in table

logindate   2013-08-29 13:55:48   

the logindate column's datatype nvarchar(150)

i want convert logindate column date time format using sql command

expected result.

logindate   29-08-2013 13:55:48 

declare @chr nvarchar(50) = (select convert(nvarchar(50), getdate(), 103))  select @chr chars, convert(date, @chr, 103) date_again 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -