Joined: 04 Nov 2009
Online Status: Offline
Posts: 123
Topic: comparing full date to month and date in 2 tables Posted: 21 Dec 2009 at 8:37am
I have two tables with date fields. One table had a full date field. The other field has a month and year field. I need to pull some data from the second table but I am having problems with the formula. Here is what I have so far:
NumberVar ProductsGoal;
If {GoalsWithProductSummary.goalmonth} = Month{DriveMaster.FromDateTime} and {GoalsWithProcedureSummary.goalyear} = Year{DriveMaster.FromDateTime} Then ProductsGoal := {GoalsWithProductSummary.ProductGoal} ;
When I check the formula I am getting the error messaage "They keyword then is missing"
Joined: 22 May 2009
Online Status: Offline
Posts: 347
Posted: 21 Dec 2009 at 10:53am
Try it like this:
If {GoalsWithProductSummary.goalmonth} = Month({DriveMaster.FromDateTime}) and {GoalsWithProcedureSummary.goalyear} = Year({DriveMaster.FromDateTime}) Then ProductsGoal={GoalsWithProductSummary.ProductGoal} ;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum