I have a query where I need to find out information from the past week. It looks something like this:
lastmonday = "08-04-2003"
lastsunday = "08-10-2003"
SQL = "select * from table where (dateran BETWEEN lastmonday and lastsunday)"
This part works, but I'm having troubles figuring out how to get a value for 'lastmonday' and 'lastsunday'. It's easy to do a date subtract and take off a certain amount of days, but the amount to subtract would be different depending on what day it is. Any suggestions?
lastmonday = "08-04-2003"
lastsunday = "08-10-2003"
SQL = "select * from table where (dateran BETWEEN lastmonday and lastsunday)"
This part works, but I'm having troubles figuring out how to get a value for 'lastmonday' and 'lastsunday'. It's easy to do a date subtract and take off a certain amount of days, but the amount to subtract would be different depending on what day it is. Any suggestions?