This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getTimeStamp() date time format is bad  RSS feed

 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got following time when i used getJMSTimestamp() in MDB.



The time checked while sending was 10:34:06 and Date 13 May 2011

I am not getting where year, and time is coming. Kindly check.
 
Mike Zal
Ranch Hand
Posts: 144
Fedora Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Time in Java is saved as milliseconds since Midnight January 1, 1970. You can use the java.util.Date Class or preferably the java.util.Calendar Interface to manipulate it in useable manner. More Details
 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You
I had used following to convert long type date.

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The normal way to do this sort of thing is with a DateFormat.
 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

You are late.

Already Implemented and submitted at Super University
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well sorry I missed the deadline I neither knew nor cared about. Hopefully you now you know the correct way to do it in the future.
 
Azrael Noor
Ranch Hand
Posts: 385
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no sorry just
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!