Change date format mm/dd/yy to dd/mm/yy using query?
29 August 2009
357 views
No Comment
Sql server stores date as yyyy/dd/mm and returns with time.
use following query:
Select CAST(DAY(GETDATE()) AS VARCHAR(2)) + ‘/’ + CAST(MONTH(GETDATE()) AS VARCHAR(2)) + ‘/ ‘ + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS DATE
Result will be : in mm/dd/yyy
Popularity: unranked [?]
Related interview questions
- I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?
- What is the Global.asax used for?
- How can I get the date of Last Monday of specified week?
- Create dynamic query with dynamic joins
- I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?



(1 votes, average: 4.00 out of 5)







Leave your response!
You must be logged in to post a comment.