Results 1 to 2 of 2
  1. #1
    kunta is offline Member
    Join Date
    May 2007
    Posts
    1
    Rep Power
    0

    Default TimerTask with a Date_Time

    Hello my friends,

    I am new to Java. I am currently learning j2me.

    All I want is to play an Alert on March 3rd, 2008

    This is what I have:


    timer.schedule(new AlertTrigger, "hello friends") March 3rd, 2008. 6000 8000);

    Can someone please help me to plug in the Date properly.

    How do I create the Date Object reflecting the right values.

  2. #2
    levent Guest

    Default

    Hi Kunta,

    As far as i see, TimerTask gets time as seconds! So you will need to find approximate number of seconds between the current date and March 3rd, 2008, and pass it to the schedule method.

Posting Permissions

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