CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer

A: The recommended way to parse a String representation of a date to a Date object is to use the java.text.SimpleDateFormat class parse(String) method. In its simplest form, the class is instantiated with a String pattern argument that defines the general syntax of the date to be parsed. In the example below, the World Wide Web Consortium (W3C) date time format for year, month and day is represented by the pattern yyyy-MM-dd and is used to parse the date string 2008-09-20.

… full answer hidden

Click for full answers

Premium members click below for full answer
How can I convert a String into a Date object?

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager