I need to select the date from sqlserver (i attach the codings pls correct)
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted Apr 9, 2012, 4:03 AM EDT
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)