question

hemantkumar2380 avatar image
hemantkumar2380 asked

How to convert dd/MM/YYYY to yyyyMMdd in sqlserver 2005

How to convert dd/MM/YYYY to yyyyMMdd in sqlserver 2005

sql-server-2005datetime
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Madhivanan avatar image
Madhivanan answered

1 If you use front end application, do formation there

2 Otherwsie, use

select convert(char(8),date_col,112) from your_table            
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.