I have 2 parameters,
- an input date (DATETIME)
- input day of month (TINYINT)
If I enter 11 MAR 2014 as the DATETIME and 26 as the input day of month, I would like to select 26 FEB 2014 as the output DATETIME.
In other words, I would like to select the Xth day of the previous calendar month. I am then going to use DATEDIFF to find the current fiscal day of month.