system date format is "yy-mm-dd"
"select getdate()" ----> 2009-01-24 20:03:28.513
if i write "select dateadd(dd,2,getdate())
".it returns "2009-01-26 19:59:38.340"...my question is dat
could it be possible to retrive da date in da format "26
jan 2009 ...."??
Answers were Sorted based on User's Feedback
Answer / praveen kumar.dandu
select to_char('sysdate',dd mon yyyy)from dual
convert the date format to chars and retrive the the system
date in the format what eve r u like
Is This Answer Correct ? | 9 Yes | 2 No |
Answer / deepa
select getdate()
select Dateadd(dd,2,getdate())
select convert(varchar(12),Dateadd(dd,2,getdate()),106)
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / shailesh s. deshmukh
select convert(varchar(20),getdate(),106)
Is This Answer Correct ? | 4 Yes | 1 No |
Try this this will works fine.
select convert(varchar,dateadd(day,2,getdate()),106)
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / shailesh s. deshmukh
Dear friend try this one
select convert(varchar(11), getdate(),106)+(SELECT right
(GETDATE(),8))
as Date
or
select convert(varchar(11), getdate(),106)+(SELECT STUFF
(getdate(), 1, 11, ''))
as Date
Is This Answer Correct ? | 0 Yes | 1 No |
Explain steps of normalization?
How many cores do I need for sql server 2016?
What is indexing a document?
i have a table student like sname ----- ram ram ram raj raj raj i need the output like sname ----- ram raj ram raj ram raj
What is coalesce and check constraint in sql server?
What is primary key index?
What is the largest component inside a field?
What is the sql case statement used for? Explain with an example?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
what is the difference between openrowset and openquery?
Detail about query optimizer?
You are doing log shipping due to some reasons it is failing. How you will proceed from there