jose chiramal wrote:Could you please help me in sorting these values ?
jose chiramal wrote:I tried using something like this, but in vain :
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Mike Simmons wrote:I would recommend using SimpleDateFormat, and using parse() to convert these Strings to Dates...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Mike Simmons wrote:In fact there's already ambiguity because on 08/02/2012, no one should be using Pacific Standard Time. This probably indicates a misconfigured system somewhere.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Pat Farrell wrote:Only Java's date format classes have a timezone and locale.
Date is a four letter word in Java. Perhaps some day we will see all of the Date class and its method be deprecated and replaced by something sensible.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Winston Gutkowski wrote:Actually, that's not true. Calendar (and more specifically GregorianCalendar) has a timezone too.
jose chiramal wrote:Could someone please provide me a sample code where I would be able to sort the below data(ascending / descending).
Any help with sample code would be much appreciated.
The sorting should happen based on the TimeZone where the program is running.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Mike Simmons wrote:Those three-letter time zones may give you trouble though...
For compatibility with JDK 1.1.x, some other three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them.
If you open the box, you will find Heisenberg strangling Shrodenger's cat. And waving this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|