|
|
Date Difference Calculation Between two Records
If somebody can help me , regarding calculating difference of days between to
records.
Ex:
Record No: Date: Receipts Payments
123 01/04/2007 10000
456 10/04/2007 5000
789 20/05/2007 500
What i need is calculate date difference in two records
Record No: Diff
456 9 Days
789 40 Days
I need this days for interest calculation
if somebody could please suggest how to calculate this date difference in
query
i will be very much grateful for this solution.
Vinay.
|
|
0
|
|
|
|
Reply
|
Vinay
|
5/28/2007 3:44:16 PM |
|
You can use as subquery in a DateDiff Calculation
SELECT [Record No],
DateDiff("d",
NZ((SELECT Max([Date])
FROM YourTable as Tmp
WHERE Tmp.[Date] < YourTable.[Date]),YourTable.Date),YourTable.Date)
as Elapsed
FROM YourTable
That should return three records
123 : 0
456 : 9
789 : 40
'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
Vinay wrote:
> If somebody can help me , regarding calculating difference of days between to
> records.
>
> Ex:
>
> Record No: Date: Receipts Payments
> 123 01/04/2007 10000
> 456 10/04/2007 5000
> 789 20/05/2007 500
>
> What i need is calculate date difference in two records
>
> Record No: Diff
> 456 9 Days
> 789 40 Days
>
> I need this days for interest calculation
> if somebody could please suggest how to calculate this date difference in
> query
> i will be very much grateful for this solution.
>
> Vinay.
>
|
|
0
|
|
|
|
Reply
|
John
|
5/28/2007 5:41:23 PM
|
|
Vinay wrote:
>If somebody can help me , regarding calculating difference of days between to
>records.
>
>Ex:
>
>Record No: Date: Receipts Payments
>123 01/04/2007 10000
>456 10/04/2007 5000
>789 20/05/2007 500
>
>What i need is calculate date difference in two records
>
>Record No: Diff
>456 9 Days
>789 40 Days
>
>I need this days for interest calculation
You can use this kind of expression in a textbox:
=DateDiff("d", DMax("[Date]", "yourtable", "[Date] < " &
Format([Date], "\#yyyy\-m\-d\#"), [Date])
If you will need to sum those values, you may be better
using that as a calculated field in the report's record
source query.
--
Marsh
MVP [MS Access]
|
|
0
|
|
|
|
Reply
|
Marshall
|
5/28/2007 6:01:35 PM
|
|
|
2 Replies
790 Views
(page loaded in 0.026 seconds)
Similiar Articles: Date Difference Calculation Between two Records - microsoft.public ...If somebody can help me , regarding calculating difference of days between to records. Ex: Record No: Date: Receipts Paym... How to calculate diffrence between two dates - microsoft.public ...Date Difference Calculation Between two Records - microsoft.public ... If somebody can help me , regarding calculating difference of days between to records. running difference between adjacent records in report - microsoft ...Date Difference Calculation Between two Records - microsoft.public ... running difference between adjacent records in report - microsoft ... Date Difference Calculation ... Formula for calculating the diffrence between two dates ...Date Difference Calculation Between two Records - microsoft.public ... Calculate Equation - microsoft.public.access.forms Date Difference Calculation Between two Records ... Calculate working days between records - microsoft.public.access ...... hl=en&lnk=gst&q=date+difference+between+two+records ... in the case of New records, I want to calculate the difference between the last status change and the current date). Calculating diff btwn two dates how to count only business days ...In calculating difference between two date how can one not include weekends and ... dates - Excel - Office.com There are several ways to calculate the difference between two ... Calculating percent of a field in two different records ...Date Difference Calculation Between two Records - microsoft.public ... Calculating percent of a field in two different records ... Date Difference Calculation Between two ... Calculate difference between current date & prior - microsoft ...Date Difference Calculation Between two Records - microsoft.public ... Calculate difference between current date & prior - microsoft ... Date Difference Calculation ... Difference between today's date and a past date - microsoft ...How to Subtract Date Values in Microsoft Excel... look at the basic functions used to calculate the difference between two dates in ... only a single date, you may need ... Trying to calculate difference between two times in an access repo ...Calculate the difference between two date or time values - Access ..... that use the DateDiff function to calculate the difference between any two date and time ... is ... Date Difference Calculation Between two Records DataBaseIf somebody can help me , regarding calculating difference of days between to records. Ex: Record No: Date: Receipts Payments Date Difference Calculation Between two Records - microsoft.public ...If somebody can help me , regarding calculating difference of days between to records. Ex: Record No: Date: Receipts Paym... Microsoft Access: Date Difference Calculation Between two Records ...database.itags.org: Microsoft Access question: Date Difference Calculation Between two Records, created at:Sun, 01 Jun 2008 12:57:00 GMT with 534 bytes, last updated ... Calculate the difference between 2 dates/times on 2 separate recordsCalculate the difference between 2 dates/times on 2 separate records Queries ... I've tried various things like splitting the date and ... Date Duration Calculator: Days between two datesThe duration calculator calculates the difference in number of days, months and years between two ... Calculate between exact times (not just dates) Date calculator – add ... 7/24/2012 11:47:12 AM
|
|
|
|
|
|
|
|
|