Bookmark Topic Watch Topic
  • New Topic

Convert Time Format......  RSS feed

 
Hewa Naimanage Sumedha Amalka
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hai buddys....
I am developing a attendance system to a company.....
I used a card machine to get the attendance record for each employee and it provided me a .txt tile which contain some text fields...

I read the file and stored the records to collection classes (HashMap and LinkedList)

Now the issue is convert those record to real time data like real time and real date record...

Any one cane help me to do this task...

000000000305032008[1605, 1605, 1606, 1644, 1655, 1716, 1719, 1720, 1721, 1723, 1723, 1723, 1727]
In time ---- 1605
Out time ---- 1727

Thanks...
(Pls do not use String class methds)
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
Pls do not use String class methds


Why not? If that is one string that you posted you will need to use string methods to get at the individual time substrings. Once you have those you can use the java.text.SimpleDateFormat class (esp. its parse method) to convert the strings to Date or Calendar objects.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!