Results 1 to 10 of 10
  1. #1
    joshynaresh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    131

    calculation of day with reference of daterange


    Dear Sir, I have transaction statement. i want to select transaction with given date range and calculate days length between two transaction. but for last transaction days length it should be calculate last date range - last transaction days. i have uploaded sample days calculation formate sheet.Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Your attachment did not load.

    Not really understanding your requirements but may be this will help http://allenbrowne.com/subquery-01.html#AnotherRecord
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    enquiries is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Nov 2013
    Location
    Samoa
    Posts
    69
    If you're trying to have a calculated field in a form that calculates the difference between two dates you can in the control source property of the field add this method:
    =DateDiff("d",[DateOne],[DateTwo])+Int(Format([DateTwo], "mmdd")<Format([DateOne],"mmdd"))
    Hope that helps.

  4. #4
    joshynaresh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    131

    calculation of day with reference of daterange

    sorry buddy, my attachement has been missing. now i have attached.Click image for larger version. 

Name:	date.jpg 
Views:	17 
Size:	90.8 KB 
ID:	15923

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I still don't understand your requirements. And the data example confuses me even more. Why is the later date shown first in the range? These dates are not displayed in Access standard. Review http://allenbrowne.com/ser-36.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    joshynaresh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    131
    Let me explain in details:I want to calculate interest on daily balance. For that, days are required. Days denoted how many days certain balance has outstanding. in above image, date column is reference that in which date transaction has done. Day’s column denotes days lag between two transactions. Final column is just working notes how days lag has been calculated (to understand).But in final row, days lag has calculated by subtracting last date range and 2nd last transaction date.Thank You in advance.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    You want to calculate compounded interest? Sorry, that is beyond me. Did you search web? Bing: Access database calculate compound interest
    http://ms-access.questionfor.info/q_...ase_41416.html

    Did you review the link about date structure?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    trevor40's Avatar
    trevor40 is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    407
    Are you using Excel or Access for this ? In post #6 you talk of rows and columns!

  9. #9
    joshynaresh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2013
    Posts
    131
    dear june7,
    I'm not trying to calculate compound interest. i want to calculate interest on daily balance method for that loan outstanding days required. now i just want to calculate days lag between two transaction.

    Dear trevor40,
    I'm talking about Access. i have explained my example on post #6. i have used row and column word for understanding my example simply.
    Thank You

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Still don't understand the interest requirement.

    Perhaps if you provide an example of the actual raw data and an example of the desired output.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Variables by reference.
    By HomerTG in forum Reports
    Replies: 3
    Last Post: 02-28-2014, 01:07 PM
  2. Replies: 8
    Last Post: 08-13-2013, 04:58 PM
  3. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  4. Reference Libraries
    By dandoescode in forum Access
    Replies: 0
    Last Post: 06-07-2012, 07:07 AM
  5. need help with reference..
    By dada in forum Programming
    Replies: 3
    Last Post: 09-17-2010, 06:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums