Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Time values  RSS feed

 
rakkesh kumar
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to store the time values in Java.

the Timestamp and Time constructors taking the millisecs values since 1970 jan.

how to store an exact value.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Java in General (beginner).
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Date( long date ) constructor of java.util.Date.

To change the time, use the setTime( long time ) method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!