×

Discussion Board

Results 1 to 3 of 3

Thread: random time

  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    158

    random time

    hi....i need some idea abt creating random time ie to generate a random time for my proj

  2. #2
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Bournemouth, UK
    Posts
    65

    Re: random time

    how about creating a timestamp and then creating a random number to alter that time stamp by the random number u can then use a date object to convert that timestamp to a readable format
    Made With Caffiene And Sleepless Nights

  3. #3
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    220

    Re: random time

    Hi,

    You can use the java.util.Random class to first generate a random number and then pass it to the Date constructor to crearte a random time out of it.

    Regards
    Amit

Similar Threads

  1. How to speak local time?
    By Rafael T. in forum Symbian
    Replies: 1
    Last Post: 2008-03-14, 05:18
  2. Date & Time Editor in Form Resource.
    By Kavit Patel in forum Symbian
    Replies: 2
    Last Post: 2008-03-03, 06:26
  3. Time Machine for Symbian Series 60
    By kedarchitale in forum Symbian
    Replies: 2
    Last Post: 2006-03-30, 20:44
  4. Time Machine for Symbian Series 60 (Alarm, Stopwatch, Timer)
    By kedarchitale in forum General Development Questions
    Replies: 1
    Last Post: 2006-03-30, 20:39
  5. How to get correct time.
    By dzaga in forum Mobile Java General
    Replies: 2
    Last Post: 2003-08-06, 22:03

Posting Permissions

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