Users Pricing

forum

Home Forums Java string to date conversion – MindStick

Java string to date conversion

Mark Devid 2337 10 Aug 2015
Can somebody recommend the best way to convert a string in the format 'January 2, 2010' to a date in java? Ultimately, I want to break out the month, the day, and the year as integers so that I can use:

Date date = new Date();
date.setMonth()..
date.setYear()..
date.setDay()..
date.setlong currentTime = date.getTime();
to convert the date into time.

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md