ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
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 ...."??
 Question Submitted By :: Swapan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 ?    8 Yes 2 No
Praveen Kumar.dandu
 
  Re: 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
# 2
select convert(varchar(20),getdate(),100)
 
Is This Answer Correct ?    2 Yes 1 No
Moid
 
 
 
  Re: 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
# 3
select convert(varchar(20),getdate()+int,100)
 
Is This Answer Correct ?    0 Yes 1 No
Swapan
 
  Re: 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
# 4
select getdate()
select Dateadd(dd,2,getdate())
select convert(varchar(12),Dateadd(dd,2,getdate()),106)
 
Is This Answer Correct ?    3 Yes 0 No
Deepa
 
  Re: 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
# 5
select convert(varchar(20),getdate(),106)
 
Is This Answer Correct ?    3 Yes 0 No
Shailesh S. Deshmukh
 
  Re: 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
# 6
select convert(varchar,getdate(),106)
 
Is This Answer Correct ?    2 Yes 1 No
Senthil Kumar.m
 
  Re: 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
# 7
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 0 No
Shailesh S. Deshmukh
 
  Re: 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
# 8
Try this this will works fine.

select convert(varchar,dateadd(day,2,getdate()),106)
 
Is This Answer Correct ?    1 Yes 0 No
Bipin Singh
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
where do you use Isolations?give me some exmpale?  1
Assume,there are three tables in a database, Can i have both primary key and foreign key for each table in the same database?  4
Wht is SQL Injection Attack ?  1
I have a huge amount of data which is displayed in a report. The data is viewed every day. Every day the data is displayed in 30 secs but suddenly today it is giving an timeout message today. Data has not been changed. The situation is same as yesterday. What might be the reason??? Please Answer. Satyam4
9. Write a query to list a new column with the difference in temp of the cities Delhi and Mumbai, Mumbai and Jammu and soon. Consider the following table : City_id City Temp. 1 delhi 40 2 Mumbai 35 3 Jammu 32 4 Pune 18  2
how to delete duplicate rows from table in sql server HCL8
1.what is the purpose of using alias name in sql server? with certain example? 2.what is cursor?will u plz explain me in detail with certain example?  3
What is the difference between SSAS 2000 and SSAS 2005? APX1
how to update a null value field in sql server eg a table contains 3 fields id,name,salary and 3 records salary of 1 record is null i want update the nullfield 111 arun 300 112 ddd 200 113 ttt null i want to update table with add 100 to every record include null after updation the recrds should be 111 arun 400 112 ddd 300 113 ttt 100 HCL6
What is blocking and how would you troubleshoot it?  1
What are the all different types of Joins in SQL Server 2000, Anybody can explain each join with definition..Thanks in advance.... Siemens6
HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY IN EMP TABLE TCS16
The Difference between 'Count' and 'Count(*)'  12
explain different types of jions with examples briefly? Zensar1
What's the difference between a primary key and a unique key? Wipro8
WHAT IS DIFFRENCE BETWEEN TRUNCATE AND DELETE STATEMENT CTS10
how to get the automatic backup of the database in the sql server  3
What is a Lock and let me know Different types of locks?  1
can you anybody tell me the how can you restore the master database. while migraion(one server to onther server)?  1
What is data integrity? Explain constraints? Thinksoft1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com