-1

My android application needs to display time which has to be incremented according to a logical check

my condition example is below

    d = (String) DateFormat.format("yyyy-MM-dd,hh:mm:ss", new java.util.Date());
if(condition)
    {
     //i want to increment the time for about an hour and display
    }
    else
     {
      // increment the date to 1 and display
     }

am not concerned about the condition but on the code for incrementation of time and date

now how to code in order to increment accordingly to the above mentioned time format

D3vil_Mind
  • 339
  • 2
  • 3
  • 13

1 Answers1

0

Umm.
Use Calendar instead.
If you look at the documentation, you should be able to figure out how to do what you want.

If you can't figure it out from the docs (after putting forth honest effort), then I'll be happy to elaborate on the process.

Reed
  • 14,703
  • 8
  • 66
  • 110