• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String to time stamp

 
Nagendra Shastry
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi all,

I have a string which has the value of a date 2013/03/12 . I want set it to a time stamp variable with same value i.e., 2013/03/12 . Can you please help?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15216
36
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use java.text.SimpleDateFormat (<= click to see the API documentation) with the appropriate format string to parse the string into a java.util.Date object.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic