fromString()

Creates a date variable by parsing value according to pattern.

Syntax

Date fromString(String pattern, String value)
  1. pattern follows the formatting rules defined by java.text.SimpleDateFormat.
  2. value is the string to parse.