Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to check for saturday in Dates 1

Status
Not open for further replies.

Glowworm27

Programmer
Joined
May 30, 2003
Messages
587
Location
US
Hello group,

Not real familiar with the functions in Oracle, as I am rather new to Oracle.

I need to look at a lot of records to make sure the payroll date is always a saturday, if not I need to return that record to the user so they can fix it.

I was hoping for a function to be able to look at the date and make sure the date is a Saturday.

I hope someone has already written something like this that I can use, or adapt to use.

Thanks in advance


George Oakes
Check out this awsome .Net Resource!
 
for a start:
select to_char(sysdate,'DAY') from dual;
 
Hoinz,

thanks for the inspiration. I was able to use the to_Char function to look at my records and return records

Where to_char(Work_week_Ending_date, 'DY') <> 'SAT';

This worked perfectly

Thanks again.

Also thanks to Santamustafa for an earlier post I found when searching the archives for some function he wrote to test for weekends.

I'll give you a star for sending me in the right direction!




George Oakes
Check out this awsome .Net Resource!
 
...or how about

Code:
SELECT next_day(sysdate,'saturday')
FROM dual;

Disclaimer: The string 'saturday' is subject to regional settings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top