I need to select the date from sqlserver (i attach the codings pls correct)
i need to select the date from sqlserver (i attach the codings pls correct)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Apr 9, 2012, 8:03 AM
In sql server, if you want to get the current date then
SELECT GETDATE();
You can format the date in sql server.
SELECT CONVERT(VARCHAR,GETDATE(),101) - It displays mm/dd/yy
SELECT CONVERT(VARCHAR,GETDATE(),103) - It displays dd/mm/yy
Similarly you can format the date as mentioned below.
(century yy)
(century yyyy)