This is probably a bonehead question, but I can't make it work. I want to prompt the user for a single date and select all records with a date falling within the week prior.
Obviously this works:
This also works (using the sys date):
This doesn't:
What am I doing wrong? Any help is greatly appreciated!
Obviously this works:
Code:
DATE BETWEEN @variable('Begin Date:') AND @variable('End Date:')
Code:
DATE BETWEEN to_date(to_char(current_date,'mm/dd/yy'),'mm/dd/yy')-7 AND to_date(to_char(current_date,'mm/dd/yy'),'mm/dd/yy')
Code:
DATE BETWEEN to_date(to_char(@variable('End Date:'),'mm/dd/yy'),'mm/dd/yy')-7 AND @variable('End Date:')
Comment