• Post Reply Bookmark Topic Watch Topic
  • New Topic

Removing nano sec from TimeStamp  RSS feed

 
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
 
Marshal
Posts: 58305
178
  • 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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!