cancel
Showing results for 
Search instead for 
Did you mean: 

Month Parameter in YYYY-MM format

Former Member
0 Kudos


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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Vijay,

What is the error you receive and do you receive an error in the Record Selection Formula?

Also, it seems you're trying to display month as two digits; just use this code:

totext(Month({Database_DateField}),'00')

And the year formula :

totext(Year({Database_DateField}),'#')

-Abhilash

Former Member
0 Kudos


It worked.Thank you Abhilash.

Answers (0)