I have date in mm/dd/yyyy format in database.I want to display in form as dd/mm/yyyy. Can anybody help?I want to get time along with date.
CONVERT(VARCHAR(10), YourField, 103)
Per your comment - you want the time as well.
select (CONVERT(VARCHAR(10), YourField, 103) + ' ' + CONVERT(VARCHAR(15), YourField, 108)) as DateTime
http://msdn.microsoft.com/en-us/library/aa226054.aspx
1.4m articles
1.4m replys
5 comments
57.0k users