Topic: SQL*Plus and PL/SQL >> Query To Display Start Date and End Date for the Period time
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: Query To Display Start Date and End Date for the Period time |
| animumbai |
Posted: Jun 02, 2008 02:55:08 AM |
Total Post: 9
Joined: Dec, 2007
|
Hi All,
I need query to display the Start Date and End date for giving in period time
for example :
i give period like Quartely then
start Date= ='1-jan-2008' end date ='31-march-2008'
i give period like Semi Anually then
start Date= ='1-jan-2008' end date ='30-june-2008'
please can u help me out.... |
|
|
Geetha |
| Posted: Jun 02, 2008 05:21:04 AM | |
|
Total Post: 21
Joined: Mar, 2008
|
Dear ani...
Could u plz be specific... u need a query to display the quaterly data and half-yearly through scripting???
regards,
Geetha
|
|
|
|
|
Murtuja |
| Posted: Jun 02, 2008 05:22:53 AM | |
|
Total Post: 855
Joined: Jan, 2006
|
select TRUNC(SYSDATE,'Q'),add_month(TRUNC(SYSDATE,'Q'),3) from dual;
This query will give you quarter start_date and end_date.
|
|
|
|
|
Azaz |
| Posted: Jun 02, 2008 06:37:54 AM | |
|
Total Post: 82
Joined: Mar, 2008
|
select TRUNC(SYSDATE,'Q'),add_months(TRUNC(SYSDATE,'Q'),3) from dual;
Sorry friend, function is add_months and its working fine
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 855 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 275 |
| neeraj sharma | 254 |
| Ramesh Jois | 245 |
| Bishal Khetan | 207 |
|
|