Unanswered: Getting data from Monday - Friday, exclude weekends in db2
I am using db2 my query (very simple) goes as follows:
Select ShpDate, ShpAmt
Here is where I am having an issue. I need to get the previous business day data. For example If today is Tuesday then I need to get Monday data. The problem I encountered is what about Friday night. Our business days are from Monday - Friday. When Monday comes around I need Friday's date data. The date fields are defined as Decimal (8,0) in YYYYMMDD format. How can I code this from my SQL above. We are using the latest version of db2. Any help will be appreciated. Thank you in advance.