This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java date/time long value in database

 
Martin Coetzee
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone. Here's my question. We store the java date/time long value in the database as ie: 1173691253612. Another system that's non java needs to read the value, and interpret it as a date. How do you format this value into a date if you don't use java? Is there a special algorithm?
 
Jeremy Botha
Ranch Hand
Posts: 125
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Martin.

The sun API documentation for date states that the long value of Date specifies the number of milliseconds since 01 January 1970, 00:00:00.000 GMT.

You need to ensure that the non-java system you're interfacing with either uses this epoch, or is able to do the conversion between the Java epoch and whatever epoch it operates in.

hope this helps!

Jeremy
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic