Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22
  1. #21
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    760
    Rep Power
    8

    Default Re: Date class in an IF statement

    Java Code:
    if ((expiryYear >= currentYear) && (expiryYear <= currentYear + range)) {
        System.out.println("*");
    }
    All you have to do now is get the expiryYear from the your credit card expiry date, get the currentYear from today's date. And do all the required comparison between those values.

  2. #22
    shahin912 is offline Member
    Join Date
    May 2012
    Posts
    15
    Rep Power
    0

    Default Re: Date class in an IF statement

    i found how to do it. Thank you. I will Rep all your posts ;)

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Need help using date class
    By enigmaenigma in forum New To Java
    Replies: 1
    Last Post: 05-01-2012, 02:14 AM
  2. SQL Prepared Statement with date
    By Dcalladi in forum New To Java
    Replies: 3
    Last Post: 02-18-2012, 04:37 PM
  3. Date() class to get current date
    By bigmac15 in forum New To Java
    Replies: 1
    Last Post: 06-28-2011, 10:17 PM
  4. Help creating a Date class
    By Meta in forum New To Java
    Replies: 17
    Last Post: 04-30-2010, 10:28 AM
  5. problem with date class
    By gabriel in forum New To Java
    Replies: 3
    Last Post: 08-03-2007, 02:28 PM

Tags for this Thread

Posting Permissions

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