garyaj Posted August 18, 2008 Posted August 18, 2008 Hi I would like to be able to calculate the number of days that have passed between a new record and the previous one only and have that figure displayed in the latest record. any advice as to the neatest way to do this? Thanks as always.
LaRetta Posted August 19, 2008 Posted August 19, 2008 (edited) Here is one way - Calculation (result is number) Case ( theDate ; theDate - GetNthRecord ( theDate ; Get ( RecordNumber ) - 1 ) ) This does not require an additional table occurrence (simply to look backwards one record) so I like it. UPDATE: I was a bit surprised to see that this calculation still produced a result, ie, -731143, when there was not a value in theDate EVEN IF 'Do not evaluate if all referenced fields are empty' is unchecked. So it requires a test for non-empty date first. Edited August 19, 2008 by Guest Added update
garyaj Posted August 19, 2008 Author Posted August 19, 2008 Hi LaRetta Thank you for your reply. I have been an idiot and forgot to mention something...on reflection VERY important. I only want to calculate the days between subsequently created records for records that have the same CoID. Sorry for being an idiot. All help appreciated.
Recommended Posts
This topic is 5999 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