• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

Return the last saturday date regardless of when the sql was ran in any given week

Guys, I want to return the date of the last saturday regardless of when the code was ran.

ie today is 15/01/2015 so last saturdays date is 10/01/2015.

I want to run this any day of the week but the result has to be the same so when I run the code next week on say the 20/01/2015 the saturday to be returned is the 17/01/2015

Any Help

Thanks
0
DarrenJackson
Asked:
DarrenJackson
1 Solution
 
DarrenJacksonAuthor Commented:
just worked it out

TRUNC(SYSDATE, 'IW') -2
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now