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

please bar with my english i having a database called tblhallreservation in which res_date is date field has to select all the fields in table deponding on month either has to display all details for the month jan or feb and so on

1 Answers  


How to make remote connection in database?

0 Answers  


Show Practically Sql Server Views are updatable?

0 Answers   QuestPond,


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

0 Answers  


Can we passed multiple recordset(set of records) using a Stored Procedure

2 Answers  


how to find maximum identity number in a table ?

2 Answers   JPMorgan Chase, Thomson Reuters, Wipro,


What are the type of Indexes? which one is best, why?

6 Answers  


Do you know what is difference between index seek vs. Index scan?

0 Answers  


Differences between logshipping and mirroring

1 Answers   Microsoft, Syntel,


Why I am getting this error when renaming a database in ms sql server?

0 Answers  


what is the Surrogate key?and wt is the diff between Primary key and Surrogate Key?

2 Answers  


When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?

0 Answers  


Categories