PDA

View Full Version : trying to find a day :)


slimak
06-08-2004, 03:22 AM
how can I select records from a base, when I want to find records from the
past week (monday-sunday). I work on th Oralce 9i but I work with it two
weeks only :)))

Ed prochak
06-08-2004, 10:12 AM
"slimak" <slimak@infinity.net.pl> wrote in message news:<ca47g3$2h9$1@serwer.infinity.net.pl>... how can I select records from a base, when I want to find records from the past week (monday-sunday). I work on th Oralce 9i but I work with it two weeks only :)))

Look up the TO_CHAR() function and the data formats in the SQL manual.
There is a format which specifies the day of the week. And you will
need to read up on date arithmetic, in particular, what happens when
you find the difference between two dates (IOW, perform a subtraction
of one date from another).

That will get you moving in the right direction. In general, ORACLE's
documentation is very good, so read it whenever you can.

HTH,
Ed

PS you are posting from Poland, right?

slimak
06-08-2004, 09:49 PM
PS you are posting from Poland, right?

yes, thank you for your answer. It was useful :)

Sybrand Bakker
06-26-2004, 11:50 AM
On Tue, 8 Jun 2004 13:22:19 +0200, "slimak" <slimak@infinity.net.pl>
wrote:
how can I select records from a base, when I want to find records from thepast week (monday-sunday). I work on th Oralce 9i but I work with it twoweeks only :)))


Look up the next_day function in the sql reference manual.


--
Sybrand Bakker, Senior Oracle DBA


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service