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 / rajeev

select to_char(trunc(add_months(sysdate-3),mm),mm/dd/yyyy) from dual--This query will return error...
we can use below query..
select to_char(trunc(add_months(sysdate-1,3),'mm'),'mm/dd/yyyy') from dual;
output:05/01/2018

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why join is faster than subquery?

1159


What is trigger and stored procedure in sql?

1092


What is a sql statement?

1018


What is hibernate and its relation to sql?

1171


what is top in tsql? : Transact sql

1171


How do I run a query in pl sql developer?

1050


how to convert character strings to numeric values? : Sql dba

1166


Can you do multiple joins in sql?

1120


what is csv? : Sql dba

1049


What is full join in sql?

1035


What is sql exception?

1012


What are the different datatypes available in PL/SQL?

1146


How do you declare a constant?

1016


How to avoid using cursors?

1175


Which command is used to call a stored procedure?

1052