Home » SQL & PL/SQL » SQL & PL/SQL » Oracle equivalent of an old Centura SQL function
Oracle equivalent of an old Centura SQL function [message #22983] Fri, 08 November 2002 13:43 Go to next message
Steve Wing
Messages: 1
Registered: November 2002
Junior Member
Hello out there,
Does anyone know of an Oracle equivalent to a Centura SQL function called @weekday which returns a number as follows: 0 = Sat, 1 = Sun, 2 = Mon... 6 = Fri ?
Thanks for any help or a push in the right direction!
Re: Oracle equivalent of an old Centura SQL function [message #22984 is a reply to message #22983] Fri, 08 November 2002 13:56 Go to previous message
ctg
Messages: 146
Registered: July 2002
Senior Member
TO_CHAR(date_field,'D') -- returns the day of the week
Sunday=1,Monday=2,Tuesday=3...Friday=6,Saturday = 7

TO_CHAR(date_field,'DD') -- returns the day of the month

TO_CHAR(date_field,'DDD') -- returns the day of the year
Previous Topic: catching exceptions
Next Topic: getting program from v$session
Goto Forum:
  


Current Time: Mon Apr 29 09:47:53 CDT 2024