fromString()

Creates a date variable by parsing value according to pattern.

Syntax

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