dbTalk Databases Forums  

trunc year

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss trunc year in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
Michel Cadot
 
Posts: n/a

Default Re: trunc year - 10-24-2008 , 11:06 AM







<muhammaddzulkarnain (AT) gmail (DOT) com> a écrit dans le message de news:
2649ff43-afda-45de-8508-7055f3a5dfa6...oglegroups.com...
On Oct 24, 1:00 am, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
Quote:
muhammaddzulkarn... (AT) gmail (DOT) com> a écrit dans le message de news:
e4851241-fa80-40ea-8052-9acb883a8... (AT) d31g2000hsg (DOT) googlegroups.com...
| Below is to get date range between a month
|
| SQL> select sysdate,
| 2 trunc(add_months(sysdate,-1),'month') start_date,
| 3 trunc(sysdate,'month')-1 end_date
| 4 from dual;
| SYSDATE START_DATE END_DATE
| ---------- ---------- ----------
| 21/10/2008 01/09/2008 30/09/2008
|
|
|
| how to get date range between a year?
|
| start_date = 20080101
| end_date = 20081231

See answers to your question at:http://www.orafaq.com/forum/t/126566/102589/

Regards
Michel
i had tried your script just now. That was good. But now i have
changed and i only want to display how to get year range between a
previous year and current year (eg. previous year = 2007 and current
year 2008)

--------------------------------------

And then? The elements and functions are there in the examples and
documentation, don't you want to try it by yourself ?

Regards
Michel




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.