Fuge Posted December 20, 2001 Posted December 20, 2001 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
danjacoby Posted December 20, 2001 Posted December 20, 2001 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.
Vaughan Posted December 21, 2001 Posted December 21, 2001 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.
Steven H. Blackwell Posted December 21, 2001 Posted December 21, 2001 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
Recommended Posts
This topic is 8445 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now