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

What will be the output of this Query?
select to_char(trunc(add_months(sysdate-3),mm),mm/dd/yyyy) from dual

Answer Posted / sreeharibabu

select to_char(trunc(add_months(sysdate,-3),'mm'),'mm/dd/yyyy') from dual;--sysdate:22-APR-2016 output :01/01/2016
-- corrections in add_months , mm ,mm/dd/yyyy
--- flow--
select add_months(sysdate,-3) from dual;--sysdate:22-APR-2016 -- output : 1/22/2016 8:15:24 AM

select trunc(add_months(sysdate,-3),'mm') from dual;--sysdate:22-APR-2016 output : 01/01/2016

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sap sql anywhere?

1066


Is sql a dbms?

996


What is difference between sql and mysql?

1117


What is error ora-12154: tns:could not resolve the connect identifier specified?

1064


What is faster join or subquery?

1009


Can pl sql procedure have a return statement?

1020


how to return query output in html format? : Sql dba

1070


What is rank dense_rank and partition in sql?

1023


Which kind of parameters cannot have a default value in pl sql?

1140


What is nvarchar in sql?

921


The in operator may be used if you know the exact value you want to return for at least one of the columns.

1122


What is the difference between inner join and natural join?

997


List out the acid properties and explain?

949


What is mdf ldf and ndf?

991


Explain what is a database?

1079