Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

convert dd/mm/yyyy to yyyy-mm-dd in sql server

set dateformat dmy;
select PersonalDetails_DOB
    ,convert(nvarchar(10), cast(PersonalDetails_DOB as datetime), 102) as ANSI_DOB
    ,convert(nvarchar(10), cast(PersonalDetails_DOB as datetime), 120) as ODBC_DOB
from Users;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #sql #server
ADD COMMENT
Topic
Name
9+8 =