I am using CR 8.5 with SQL 2000 backend. I am facing a problem while comparing dates. I have to show certain records if the year and month match. I am using the following formula:
if {Participant_Move_in_Trans.Term} = "L"
and
{Participant_Move_in_Trans.International_Indicator} = "D"
and
{Participant_Move_in_Trans.Project} < "900"
and
{Participant_Move_in_Trans.Trans_Category} = "Local"
and
{participant.position} = "OAKWOOD AE"
and
(left({Participant_Move_in_Trans.Orig_Move_in_Date}, 4))
=
(left({plan_manager.set_period_str},4))
and
(mid({Participant_Move_in_Trans.Orig_Move_in_Date},5,2))
=
(mid({plan_manager.set_period_str},5,2))
then
1
else
0
{Participant_Move_in_Trans.Orig_Move_in_Date} is a string with data like "20031019"
{Plan_manager.set_period_str} is a string with data like "20031019"
My problem is that the report is only returning records where the year, month and date are exaclty the same. I need records with the same year and month not the date. Can someone please help me correct the formula?
Thanks in advance.
Kchaudhry
if {Participant_Move_in_Trans.Term} = "L"
and
{Participant_Move_in_Trans.International_Indicator} = "D"
and
{Participant_Move_in_Trans.Project} < "900"
and
{Participant_Move_in_Trans.Trans_Category} = "Local"
and
{participant.position} = "OAKWOOD AE"
and
(left({Participant_Move_in_Trans.Orig_Move_in_Date}, 4))
=
(left({plan_manager.set_period_str},4))
and
(mid({Participant_Move_in_Trans.Orig_Move_in_Date},5,2))
=
(mid({plan_manager.set_period_str},5,2))
then
1
else
0
{Participant_Move_in_Trans.Orig_Move_in_Date} is a string with data like "20031019"
{Plan_manager.set_period_str} is a string with data like "20031019"
My problem is that the report is only returning records where the year, month and date are exaclty the same. I need records with the same year and month not the date. Can someone please help me correct the formula?
Thanks in advance.
Kchaudhry