Date Arithmetic
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Date Arithmetic

  1. #1
    Join Date
    Jul 2001
    Location
    New Zealand
    Posts
    77

    Date Arithmetic

    I am currently working on code that will query a loan draw-down date in a database, check the current date (on the local machine), calculate how many WHOLE months have passed since that time, calculate the dollar amount that should've been paid to date (monthly instalments), compare that with the amount actually paid, and finally, inform the user of the sum that customer is currently in default (if any).

    Most of the above is no problem, using SQL and simple float arithmetic once working with dollar values. The tricky part is getting the current date from the local machine, and then deriving the number of WHOLE months that have passed since loan draw-down date. From there on it's straight forward.

    Any assistance much appreciated.



    Chris.

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Date Arithmetic

    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    Jul 2001
    Location
    New Zealand
    Posts
    77

    Re: Date Arithmetic

    Thanks!

    And I found links there to...

    http://www.javaworld.com/jw-12-2000/jw-1229-dates.html
    and...
    http://www.javaworld.com/javaworld/j...9-dates_p.html

    which were also most enlightening.

    Chris.

  4. #4
    Join Date
    Oct 2017
    Posts
    2

    Re: Date Arithmetic


  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    19,012

    Re: Date Arithmetic

    Quote Originally Posted by sidsomashak View Post
    You can refer the links below. Mentioned links have rich resource with explanation. Hope it helps.
    Are you really sure "it helps" after 16 years?
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)