Results 1 to 5 of 5

Thread: How long until a given date

  1. #1

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375

    How long until a given date

    I am trying to figure out how to determine how many days until a given date from today.

    For example, if today is 4/26 and I need to know how long until 5/17, I need to know that it is 21 days.

    But if I need to know how long until 1/21, I'd need to know 270.

    Basically, I'm looking for the number of days from today to the next occurrence of a give MM/DD combo regardless of year.

    Thanks!
    Last edited by rockies1; Apr 26th, 2010 at 09:03 AM. Reason: typo
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  2. #2
    New Member
    Join Date
    Apr 2010
    Posts
    6

    Re: How long until a given date


  3. #3

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375

    Re: How long until a given date

    I'm looking for a Java solution, not an SQL solution, but thanks.
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

  4. #4
    New Member
    Join Date
    Apr 2010
    Posts
    6

    Re: How long until a given date

    Sorry about that, should have looked which section I was in.

    Have you tried this:

    http://www.java2s.com/Code/Java/Deve...entwodates.htm

  5. #5

    Thread Starter
    Hyperactive Member rockies1's Avatar
    Join Date
    Jul 1999
    Location
    Stuck at work
    Posts
    375

    Re: How long until a given date

    That helped greatly, THANK YOU!
    Morgan
    [email protected] - Home
    [email protected] - Work
    Using VB6 SP6 but trying to learn VB2005EE

Posting Permissions

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



Click Here to Expand Forum to Full Width