I am an infant in BO. I want to create a variable in which I need to compare Order Creation Date with First Day of Month and Last Day of Month. I have gone through the posts here regarding this, I found huge no of posts on calculating the 1st & last day of month based on a date value. But, I don’t have any date objects in the universe level, instead I have only Month Name/Month Number objects in the universe level (as it is a monthly report)
So, How to create 1st day & last day of month based on the month selected.That is, If I run the report for FEB 2011 (Prompt values) I want the 1st date & last date of FEB 2011 & not the first & last days of Current month
First you need to convert your Date number to Date.
Use the help of relativedate,Daysnumberofmonth, and lastdayofmonth function to calculate firstday and lastday of selected month.
Sorry to ask like this, I wasn’t able to create the variable with the formula you gave.
I am having 2 parameters in my Query
Month Prompt with “Inlist” operator
Year with Equal To operator
Variable I created
V_First Day of Month=ToDate(UserResponse(“Reporting Month”);“Mmm”) “with out using year” — ouput I am getting 1/1/1973 year wrong as I haven’t given yyyy in the variable.
If I add yyyy in the variable
V_First Day of Month=ToDate(UserResponse(“Reporting Month”);“Mmm yyyy”) then it throughout error #ERROR