Skip to Content
0
Former Member
Feb 09, 2015 at 08:49 PM

Month Parameter in YYYY-MM format

24 Views


Hi

I need help.

i need to create month parameter in yyyy-mm format.

I created month and year as a 2 separate parameters. & in the formula i mention for month as

month: if length(replace(totext(month({Database.Datefield})),".00","")) = 1 then

"0" & replace(totext(month({Database.Datefield})),".00","")

else if length(replace(totext(month({Database.Datefield})),".00","")) = 2 then

replace(totext(month({Database.Datefield})),".00","")

Year:Replace(Replace(Totext(Year({Database.Datefield})),",",""),".00","")

report parameter: & " Month: " & {@Year}& "-" & {@Month}

And in the selection formula :

(month({Database.Datefield}))= ({?Month})

and

(Year({Database.Datefield})) = ({?Year}). it giving me error.

i don't know, where i went wrong can u help me.

my req is when they selected monthparameter all the products purchased in that month should show

thanks in advance