Nov 17, 2009 #1 abc567 Programmer Jul 8, 2009 45 US Hi, I am required to write a condition like, NumberVar df= Datediff('d',Field1, Field2); if ( 0 < df <=50 ) then 1 else 0 But i am unable to write it in formula..
Hi, I am required to write a condition like, NumberVar df= Datediff('d',Field1, Field2); if ( 0 < df <=50 ) then 1 else 0 But i am unable to write it in formula..
Nov 17, 2009 #2 Madawc Programmer Sep 5, 2002 7,628 GB Try a formula field with Code: Datediff('d',Field1, Field2) Then another with Code: If @Diff <=50 then 1 else 0 For most purposes, formula fields are easier than variables. Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP Upvote 0 Downvote
Try a formula field with Code: Datediff('d',Field1, Field2) Then another with Code: If @Diff <=50 then 1 else 0 For most purposes, formula fields are easier than variables. Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP
Nov 17, 2009 #3 lbass Technical User Feb 9, 2002 32,816 US I would change that last formula to: If {@Diff} >= 0 and {@Diff} <= 50 then 1 else 0 Make sure you have syntax set to Crystal syntax (above the formula area). -LB Upvote 0 Downvote
I would change that last formula to: If {@Diff} >= 0 and {@Diff} <= 50 then 1 else 0 Make sure you have syntax set to Crystal syntax (above the formula area). -LB