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: Date questions

Re: Date questions

From: Arnold Schommer <arnold.schommer_at_io-computer.de>
Date: 1998/01/26
Message-ID: <34CCBF62.25B71D2@io-computer.de>#1/1

Laura Bellini schrieb:
>
> Hi -
> Can someone tell me how to just get the day of the week out of a date in
> Oracle?
>
> For example, is 1/19/98 a 'monday', 'tuesday', 'wednesday', etc.?
>
> I know SQL Server has a function that allows you to do this - can't seem to
> find it in Oracle.
>
> Thanks in advance!
>
> Laura Bellini
> laura_bellini_at_compaq.com

First, to find out what weekday the date is, convert the date using a

format-mask:

   to_char(date, 'D')

unforortunately, this only returns digits (1=Sunday...; maybe this can

be changed somewhere). So you will have to decode it:

   decode(to_char(date, 'D'), '1', 'Sunday', '2', 'Monday', '3',

'Tuesday', '4', 'Wednesday', '5', 'Thursday', '6', 'Friday', '7',

'Saturday') Received on Mon Jan 26 1998 - 00:00:00 CST

Original text of this message

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