• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Convert from Epoch to Real Time

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my "beginners guide" I inherited is a code that creates a "csv-style" report (enc)
My tasks are:
1) convert epoch time to Real Time
2) cross reference another file to this one, so that all information on a timestamp basis are on one line.

Unfortunately the data seems to be stored in memory so I have to do it once the file is written.

Any ideas on where to begin?


timestamp|sym|alpha|value|raw
1442386500000000000|CODE_REF|final|0.0|NA
1442386500000000000|CODE_REF|BPTNA|NA
1442386500000000000|CODE_REF|BOC01|NA|NA
1442386500000000000|CODE_REF|NA|NA
1442386500000000000|CODE_REF|MT|NA|NA
1442386500000000000|CODE_REF|VP|0.0|0.0
1442386510000000000|CODE_REF|final|-0.44511335956681863|NA
1442386510000000000|CODE_REF|BPT-0.2736842105263158|-0.6842105263157895
1442386510000000000|CODE_REF|BOC01|-0.12594079954272813|-0.16792106605697085
1442386510000000000|CODE_REF|BOC ESZ5|-0.12594079954272813|-0.16792106605697085
1442386510000000000|CODE_REF|MT|-3.627110815707182E-5|-3.0225923464226515E-5
1442386510000000000|CODE_REF|VP|0.08048872115311054|0.16097744230622107
 
Sheriff
Posts: 7123
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use the Apache Commons CSV package.
 
Jay Edgware
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quick response. Will take a look
 
Marshal
Posts: 76884
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And welcome to the Ranch

I think this question is too difficult for the Beginning forum, so I shall move it.
 
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic