Re: DateTime Format Elements

From: Brian D. Wall <bwall-99_at_alumni.calpoly.edu>
Date: 13 Jun 2002 16:15:59 -0700
Message-ID: <e4a4deb1.0206131515.266c227f_at_posting.google.com>


Mark.Powell_at_eds.com (Mark D Powell) wrote in message news:<2687bb95.0206030754.5bd1e59b_at_posting.google.com>...
> bwall-99_at_alumni.calpoly.edu (Brian D. Wall) wrote in message news:<e4a4deb1.0205311547.265750b@posting.google.com>...
> > I was looking for a way to find what week of the month a day falls on, but
> > found it wasn't working like I expected. Here's an example:
> >
> > EXPECTED RESULTS:
> > May 1, 2002 is a Wednesday, so I would expect the following Results:
> > Week #1 = Wed. May 1 - Sat. May 4
> > Week #2 = Sun. May 5 - Sat. May 11
> > etc...
> >
> > ACTUAL RESULTS:
> > The results I get are as follows:
> > Week #1 = Wed. May 1 - Tues. May 7
> > Week #2 = Wed. May 8 - Tues. May 14
> > etc...
> >
> > What I find interesting is that the Week of Year function behaves like I
> > would expect the Week of Month to behave. The first week of 2002 is Jan 1 -
> > 5, not Jan 1 - 7. Why the inconsistency?
> >
> > Brian
>
> Brian, if would help get a useful response if you posted the SQL you
> were using to get the Day/Week since Oracle supports more than one
> week definition. From the SQL manual:
>
> WW Same day of the week as the first day of the year.
> IW Same day of the week as the first day of the ISO year.
> W Same day of the week as the first day of the month.
>
> HTH -- Mark D Powell --

Mark,

Thank you for the follow-up. I was refering to 'W', but I'm not entirely clear what the difference is between 'year' and 'ISO year'. Perhaps I should just ask: Why is there not a DateTime Format Element that gives you the week of the month, based on a Monday - Sunday period? It seems this would be more useful than the current 'W' option, which is based on the first day of the month.

Thanks for your help.
Brian Received on Fri Jun 14 2002 - 01:15:59 CEST

Original text of this message