• Post Reply Bookmark Topic Watch Topic
  • New Topic

TimeStamp Calculations  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a csv file, with timestamps, and I'm trying to work out how i can find the number of seconds between the two timestamps.  I asusmed the best way was to turn the string into epoch, but i'm struggling at this point.  Perhaps it isn't the best way.
The current code (not using the csv) is:



any help for a beginner would be appreciated
 
Saloon Keeper
Posts: 7993
143
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't use the Date class. Use the new java.time library instead.
 
Jay Edgware
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Stephan - that worked perfectly.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!