RE: dates

2003-01-14 Thread Jamadagni, Rajendra
Title: RE: dates





SELECT NEXT_DAY(SYSDATE + 7*(rnum-1),'Friday') FROM (SELECT ROWNUM rnum FROM DBA_OBJECTS)
/


Feel free to add a where clause
Raj
__
Rajendra Jamadagni      MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc. 
QOTD: Any clod can have facts, but having an opinion is an art!



-Original Message-
From: Imran Ashraf [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 14, 2003 8:19 AM
To: Multiple recipients of list ORACLE-L
Subject: dates



I have a table with 1 column. I want to populate it
with the dates of all the fridays for the last 2 years
and the next 2 years from sysdate.


so..


today is 14-JAN-2003


My column will have..


10-jan-2003
03-jan-2003
...
..
17-jan-2003
24-jan-2003


Any ideas?


Cheers



__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Imran Ashraf
  INET: [EMAIL PROTECTED]


Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California    -- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



*This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*1



Re: Dates

2002-10-18 Thread Daniel Wisser
hi!

then i think this is what you need:

select to_date('01-01-'||round(to_char(sysdate, ''), -1),
   'DD-MM-') from dual;

reg.
daniel

Imran Ashraf wrote:
> 
> Im running this query:
>   select round(add_months(sysdate,500),'')
>   from dual;
> This retuns:
> 01-JAN-2044.
> 
> I want it to return:
> 
> 01-JAN-2040.
> 
> Thanks
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Daniel Wisser
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Dates

2002-10-18 Thread Imran Ashraf
Im running this query:
  select round(add_months(sysdate,500),'')
  from dual;
This retuns:
01-JAN-2044.

I want it to return:

01-JAN-2040.

Thanks



--- Daniel Wisser <[EMAIL PROTECTED]>
wrote:
> hi imran!
> 
> don't exactly understand what you want to do, but
> rounding
> e.g. the year works like that
> 
> select round(to_char(sysdate, ''),-2) from dual;
> 
> i dont understand what you wanna do with days and
> months,
> but if its always 01-01 then
> 
> select '01-01-'||round(to_char(sysdate, ''),-2)
> from dual;
> 
> will do.
> 
> 
> regards
> daniel
> 
> 
> Imran Ashraf wrote:
> > 
> > Hi,
> > 
> > how do i round dates like this:
> > Date = 01-01-1996
> > Return = 01-01-2000
> > 
> > or
> > 
> > Date = 01-01-1992
> > Return  = 01-01-1990
> > 
> > Thanks.
> > 
> > __
> > Do you Yahoo!?
> > Faith Hill - Exclusive Performances, Videos & More
> > http://faith.yahoo.com
> > --
> > Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> > --
> > Author: Imran Ashraf
> >   INET: [EMAIL PROTECTED]
> > 
> > Fat City Network Services-- 858-538-5051
> http://www.fatcity.com
> > San Diego, California-- Mailing list and
> web hosting services
> >
>
-
> > To REMOVE yourself from this mailing list, send an
> E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB
> ORACLE-L
> > (or the name of mailing list you want to be
> removed from).  You may
> > also send the HELP command for other information
> (like subscribing).
> 
> -- 
> Daniel Wisser, Mag. 
> Papyrus Quality Assurance 
> DB Team 
> 
> ISIS Information Systems
> Alter Wienerweg 12
> A-2344 Ma. Enzersdorf, Austria
> 
> Phone: +43-2236-27551-149
> Fax: +43-2236-21081
> E-mail: [EMAIL PROTECTED]
> 
> Hotline: +43-2236-27551-111
> 
> Visit the ISIS Website: http://www.isis-papyrus.com
> 
>
---
> This e-mail is only intended for the recipient and
> not legally 
> binding. Unauthorised use, publication, reproduction
> or 
> disclosure of the content of this e-mail is not
> permitted.
>
---
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: Daniel Wisser
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051
> http://www.fatcity.com
> San Diego, California-- Mailing list and web
> hosting services
>
-
> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of
> 'ListGuru') and in
> the message BODY, include a line containing: UNSUB
> ORACLE-L
> (or the name of mailing list you want to be removed
> from).  You may
> also send the HELP command for other information
> (like subscribing).


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Imran Ashraf
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Dates

2002-10-18 Thread Stephane Faroult

>Hi,
>
>how do i round dates like this:
>Date = 01-01-1996 
>Return = 01-01-2000
>
>or 
>
>Date = 01-01-1992
>Return  = 01-01-1990
>
>
>Thanks.
>

create or replace function decade_round(p_date in date)
return date
is
  d_result date;
begin
  d_result := to_date('01/01'||ltrim(round(to_number(to_char(p_date,
'')),-1)), 'DD/MM/');
  return d_result;
end;
/

Regards,

Stephane Faroult
Oriole
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroul
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Dates

2002-10-18 Thread Daniel Wisser
hi imran!

don't exactly understand what you want to do, but rounding
e.g. the year works like that

select round(to_char(sysdate, ''),-2) from dual;

i dont understand what you wanna do with days and months,
but if its always 01-01 then

select '01-01-'||round(to_char(sysdate, ''),-2) from dual;

will do.


regards
daniel


Imran Ashraf wrote:
> 
> Hi,
> 
> how do i round dates like this:
> Date = 01-01-1996
> Return = 01-01-2000
> 
> or
> 
> Date = 01-01-1992
> Return  = 01-01-1990
> 
> Thanks.
> 
> __
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Imran Ashraf
>   INET: [EMAIL PROTECTED]
> 
> Fat City Network Services-- 858-538-5051 http://www.fatcity.com
> San Diego, California-- Mailing list and web hosting services
> -
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Daniel Wisser, Mag. 
Papyrus Quality Assurance 
DB Team 

ISIS Information Systems
Alter Wienerweg 12
A-2344 Ma. Enzersdorf, Austria

Phone: +43-2236-27551-149
Fax: +43-2236-21081
E-mail: [EMAIL PROTECTED]

Hotline: +43-2236-27551-111

Visit the ISIS Website: http://www.isis-papyrus.com

---
This e-mail is only intended for the recipient and not legally 
binding. Unauthorised use, publication, reproduction or 
disclosure of the content of this e-mail is not permitted.
---
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Daniel Wisser
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Dates from the v$sqlarea

2001-09-25 Thread Mark Leith

Beatriz,

Take a look at the column FIRST_LOAD_TIME in the V$SQLAREA view..

HTH

Mark

-Original Message-
Martinez Jimenez
Sent: Tuesday, September 25, 2001 16:05
To: Multiple recipients of list ORACLE-L


Hello,
Is there any way to see the dates in which the 'sql' statements from
v$sqlarea view have been inserted?
A lot of thanks,

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark Leith
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).