December 20, 200124 yr What is the correct syntax for a calculation to count records created today. I have a creation date field named "Date Entered". I thought it would be something like? Count(Date Entered)=Today Thanks Dave
December 20, 200124 yr Create a calc field called "CurrentDate" and have it equal Status(CurrentDate). Go into storage options and check the "Do not store..." button. Create a calc field called "CreatedToday" and set the following calc: If(DateCreated = CurrentDate, 1, 0). Then create a summary field that totals the field "CreatedToday". Now you can even do a summary to see how many records were created on any day in which records were created.
December 21, 200124 yr I like simplifying. <grin> You can do without the Currentdate field if you make the calculation: If(DateCreated = Status(CurrentDate), 1, 0). Actually you could go one step further and make the calculation: DateCreated = Status(CurrentDate) since this will be either true or false.
December 21, 200124 yr I think I'd do this diffrently. Create a date field auto enter creation date. Then create a global date field and use it as the "left hand" key of a relationship in the same file where the "right hand" side of the key is the date field with the auto entered calculation. You can then use any date in the global field. Run a script that gets a Count of the related records based on the selected date using the Aggregate functions. BTW, if you were to use a calculation= Status(CurrentDate), which you likely should not, that calc should be STORED, not unstored. Otherwise, tomorrow the date will change. Auto enter creation date is the way to go. HTH Old Advance Man
Create an account or sign in to comment