Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Last Week

Re: Last Week

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Mon, 27 Jan 2003 15:40:23 -0800
Message-ID: <3E35C367.A0204083@exesolutions.com>


Bill wrote:

> I'm trying to extract records from a table for last week. I would
> like a sample query that will select those records even over the end
> of the year.
>
> Thanks
>
> Bill

Take a good look at the TO_CHAR function. Using it with any date should give you what you want.

To start with try the following:

SELECT TO_CHAR(sysdate, 'D') from dual;

SELECT TO_CHAR(sysdate, 'DD') from dual;

SELECT TO_CHAR(sysdate, 'DAY') from dual;

Daniel Morgan Received on Mon Jan 27 2003 - 17:40:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US