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 ...."??

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different types of views?

545


How to set database to be single_user in ms sql server?

555


tell me what is blocking and how would you troubleshoot it? : Sql server database administration

476


What is the difference between update lock and exclusive lock?

490


How to find the service pack installed? : sql server database administration

544






What is the query and subquery?

612


Are all views updatable ?

718


What does nvl stand for?

552


What stored by the model? : sql server database administration

537


How to generate create procedure script on an existing stored procedure?

505


How to transfer data from a cursor to variables with a "fetch" statement?

580


What are the different types of join?

558


how you can get the list of largest tables in a database? : Sql server administration

544


How do you set a trace flag in sql server?

542


What is the impact on other user sessions when creating indexes?

536