8 Replies Latest reply on Jul 15, 2015 10:12 AM by schamblee

Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

I used the GetNthRecord to calculate the duration of days for water consumption. The formula works fine in so far as it getting me the difference between the current date and previous date (which GetnthRecord gets but only as number). The current-date = Date or the current on my computer: thats obvious and available. GetNthRecord ( Date ; Get ( RecordNumber ) - 1, which gets me the value of the previous date a number. But how do I turn that number into back into a date (like 02/04/2015)?

• 1. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

Is GetNthRecord ( Date ; Get ( RecordNumber ) - 1 a calculation ? If so set the calculation result to date.

• 2. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

Manage database, select the previous date calculation, bottom left hand of the calculation box there is a drop down box which states calculation result is : Number   Change Number to Date.

1 of 1 people found this helpful
• 3. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

I was able to find the duration say  between 06/15/2015 and 07/15/2015 which 31 using GetNthRecord ( Date ; Get ( RecordNumber ) - 1 ).  All the formular needs to do the calculation is Date (or current date. How to find the actual previous date in the date format.

• 4. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

Yes, how do I set the result to a date?

• 5. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

Ok, let me try that.

• 6. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

It works!!!! Could I have  been really that stupid. Thanks

• 7. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

Thanks

• 8. Re: Date - GetNthRecord ( Date ; Get ( RecordNumber ) - 1 )

It happens to all of us.