aspose file tools
The moose likes Java in General and the fly likes How to create Time and Convert from EST to IST, UK and AUS Time Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to create Time and Convert from EST to IST, UK and AUS Time " Watch "How to create Time and Convert from EST to IST, UK and AUS Time " New topic
Author

How to create Time and Convert from EST to IST, UK and AUS Time

Raghuveer Rawat
Ranch Hand

Joined: Apr 03, 2003
Posts: 102
hi all
I am creating a List box. That I want to fill with time starting from 00:00 to 23:45 in the interval of 15 minute like 00:00 then next 00:15 then 00:30 and so on. Is there any method in Java where I can add 15 minute in a time.
like if start time: 00:00
addTime(start time + 00:15) like this;
Then I would like to convert selected time from List box to IST, UK and AUS time. Is this time conversion possible in Java.
Any one who know How to do it.
Thanx in Advance


Raghuveer Rawat<br />SCJP2
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
For the first part of your problem you can set a constant to fifteen minutes and loop and increment for all your values. The constant might look like this:

For the second part, take a look at the API docs on java.util.Calendar and java.util.Timezone. That should help you do what you want.


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to create Time and Convert from EST to IST, UK and AUS Time
 
Similar Threads
Time Zone Conversion of a String
How to create Time and Convert from EST to IST, UK and AUS Time
Using java.util.Date for comparison
convert date format
How to create Time and Convert from EST to IST, UK and AUS Time