Results 1 to 5 of 5
  1. #1
    jboy is offline Member
    Join Date
    Aug 2009
    Posts
    56
    Rep Power
    0

    Default Addition of period to dates

    Hi,

    Does anyone know how I can add a period to date? for example, how can I add 300 days to the date 1/1/2000?

    Thanks in advance.

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Are you allowed to use GregorianCalendar?

  3. #3
    jboy is offline Member
    Join Date
    Aug 2009
    Posts
    56
    Rep Power
    0

    Default

    Yes, this is the class I am working on.

  4. #4
    Mr.Beans's Avatar
    Mr.Beans is offline Senior Member
    Join Date
    Apr 2009
    Location
    Virginia Beach, Virginia
    Posts
    149
    Rep Power
    0

    Default

    Have a look at the GregorianCalendar roll(int field, int amount) method.

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,863
    Rep Power
    19

    Default

    Quote Originally Posted by Mr.Beans View Post
    Have a look at the GregorianCalendar roll(int field, int amount) method.
    Did you read the API for that? It doesn't do what the OP asked for.

    For that they want add.

Similar Threads

  1. JTable and Dates
    By paluee in forum AWT / Swing
    Replies: 0
    Last Post: 03-30-2009, 08:02 PM
  2. Have a period in string, how to make it look nicer
    By JordashTalon in forum New To Java
    Replies: 6
    Last Post: 03-06-2009, 12:23 AM
  3. Help with dates
    By bumblyb33 in forum New To Java
    Replies: 1
    Last Post: 02-13-2009, 02:54 PM
  4. How to Compare two Dates
    By Java Tip in forum java.util
    Replies: 1
    Last Post: 06-24-2008, 07:05 AM
  5. signing applets for a period of time
    By sandeepk84@gmail.com in forum Java Applets
    Replies: 0
    Last Post: 12-04-2007, 01:34 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
  •