i get the data like this
i need to get the hh, mm and ss seperate and compare each row by row the hh mm ss is same or not
i need temp = gpstime[k].split(" ");
please help me
Regards
Bakthavachalam E
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32708
4
posted
0
Why don't you put the Strings into a SimpleDateFormat or similar class, get an instance from that, and separate the time from that? What is wrong with the split() call you are using?
If the input you have provided is right, then I think you also need to take in to account the date part too. How about converting the date/time in to milliseconds and then comparing it?
Baktha Elumalai
Greenhorn
Joined: Mar 13, 2010
Posts: 28
posted
0
Hi i used same way
ouput
the above output how to compare the hh, mm and ss row by row
if any idea please help me
Gokul Nanthakumar
Ranch Hand
Joined: May 11, 2010
Posts: 52
posted
0
if you want to unique data put the result into Set and get the unique result or just want to compare and find the given time is already there are not, put them into hashset or hashmap(according to your requirement) and compare it is already available or not.
Campbell Ritchie wrote:Why don't you put the Strings into a SimpleDateFormat or similar class, get an instance from that, and separate the time from that? What is wrong with the split() call you are using?
To those interested - this topic has been running for over 5 days and it is still not clear what the OP is trying to do.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Gokul Nanthakumar wrote:if you want to unique data put the result into Set and get the unique result or just want to compare and find the given time is already there are not, put them into hashset or hashmap(according to your requirement) and compare it is already available or not.