Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a field pt_YH_FY_month_year
which has Dates in format 'MMM-YYYY'.
I'm attempting to compare the field pt_YH_FY_month_year
with a date generated from the user's selection using the following expression:
=if(pt_YH_FY_month_year = date(date#(SubField(GetFieldSelections(pt_YH_FY_month_year),',',3), 'MMM-YYYY'), 'MMM-YYYY'), 1, 0)
The output from date(date#(SubField(GetFieldSelections(pt_YH_FY_month_year),',',3), 'MMM-YYYY'), 'MMM-YYYY')
produces dates in the format 'Apr-2022'. However, when I compare pt_YH_FY_month_year
to this date format, they don't match as expected.
Here's an attachment for reference:
I would greatly appreciate any insights or suggestions on why the comparison isn't working as intended
In general, last row should match.
I will do like this when you compare, because some of the functions or direct field won't match exactly due to Trim or funny formats. Try this?
If(date(pt_YH_FY_month_year, 'MMM-YYYY')=date(date#(SubField(GetFieldSelections(pt_YH_FY_month_year),',',3), 'MMM-YYYY'), 'MMM-YYYY'), 1,0)
To play around more, please share sample QVF with us.
In general, last row should match.
I will do like this when you compare, because some of the functions or direct field won't match exactly due to Trim or funny formats. Try this?
If(date(pt_YH_FY_month_year, 'MMM-YYYY')=date(date#(SubField(GetFieldSelections(pt_YH_FY_month_year),',',3), 'MMM-YYYY'), 'MMM-YYYY'), 1,0)
To play around more, please share sample QVF with us.