Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

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

system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

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

system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

Answer / moid

select convert(varchar(20),getdate(),100)

Is This Answer Correct ?    4 Yes 1 No

system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

Answer / shailesh s. deshmukh

select convert(varchar(20),getdate(),106)

Is This Answer Correct ?    4 Yes 1 No

system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

Answer / senthil kumar.m

select convert(varchar,getdate(),106)

Is This Answer Correct ?    3 Yes 1 No

system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

Answer / bipin singh

Try this this will works fine.

select convert(varchar,dateadd(day,2,getdate()),106)

Is This Answer Correct ?    2 Yes 1 No

system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

Answer / swapan

select convert(varchar(20),getdate()+int,100)

Is This Answer Correct ?    0 Yes 1 No

system date format is "yy-mm-dd" "select getdate()" ----> 2009-01-24 20:03:2..

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

Post New Answer

More SQL Server Interview Questions

What is the purpose of sql profiler in sql server?

0 Answers  


What stored by the msdb? : sql server database administration

0 Answers  


What are the advantages of using stored procedures?

0 Answers  


How do I find information about the install locations for the various instances running on a computer?

0 Answers  


How do you measure the performance of a stored procedure?

3 Answers   Infosys,


What are .mdf files?

0 Answers  


Can we move Resource database from one path to another? If yes,How can we?

1 Answers   Wipro,


What is the difference between Clustered and Non-Clustered Index?

0 Answers  


How to drop an existing table?

0 Answers  


What is the difference function and stored procedure?

0 Answers  


write coding for importing sql data into a word excel...

1 Answers   Oracle,


What are examples of triggers?

0 Answers  


Categories