• Post Reply Bookmark Topic Watch Topic
  • New Topic

Removing nano sec from TimeStamp  RSS feed

 
Neha Mohit
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there a way through which we can remove the nano seconds from timestamp. I mean without converting timestamp object into String and then doing a split on it.

Regards
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't find either timestamp or TimeStamp, but there are two versions of Timestamp in the standard API.
I think you want java.sql.Timestamp; that has a constructor which doesn't take nanoseconds. Is that any use to you?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!