Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to convert a string to date  RSS feed

Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my recordStore has timesheet records stored with fields delimited with "^". a sample record may look like "1^2^time entry desc^1:30^2:30^1/1/2005"

when i pull that record up for editing, i extract the data and get something like 1:30 = start time, 2:30 = end time. now i need to set the dateField inputs on the form to 1:30 and 2:30. because these values are string, and dateField's setDate() method only wants to accept date, i need to convert the strings to date, but how? casting won't work and i can't seem to find an libraries that will do the job.

any ideas?

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!