Results 1 to 5 of 5

Thread: Subtracting Dates [Resolved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member MethadoneBoy's Avatar
    Join Date
    Oct 2001
    Location
    Preferably somewhere between Keira Knightley and Diane Kruger but I'm not fussy
    Posts
    180

    Subtracting Dates [Resolved]

    Hi everyone,

    I'm trying to write a program that regarding dates. Specifically, what I'm trying to do is this : compare two dates to see if one is less than 10 days away from the other.

    EG

    Code:
    int days = 10;
    
    if ( thisDate - thenextdate > days ) System.out.println ( "Less that 10 days to go" );
    else System.out.println ( "No problems" );
    Any help would be appreciated

    Thanks
    Last edited by MethadoneBoy; Jan 15th, 2005 at 04:02 PM. Reason: Reolved Problem
    "'Oh, hello Mr. Crick! What do you think of Jeffrey Archer?' Clip-clip-clip! Oh, come on! Who are you kidding? You wait til I'm mayor, you'll see how tough I am! Christ almighty...."

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