Synopsis Parse an input datetime given as a string using the given format string.
Function datetime parseDateTime(str inputDateTime, str formatString)
Usage import DateTime;
rascal>import DateTime;
rascal>parseDateTime("2011-12-23T11:19:54.501+01:00", "yyyy-MM-dd\'T\'HH:mm:ss.SSSZZ");
|rascal://DateTime|(11922,394,<536,0>,<547,72>): DateTimeParsingError("Cannot parse input datetime: 2011-12-23T11:19:54.501+01:00 using format string: yyyy-MM-dd\'T\'HH:mm:ss.SSSZZ")
	at *** somewhere ***(|rascal://DateTime|(11922,394,<536,0>,<547,72>))
	at parseDateTime(|stdin:///|(47,31,<1,47>,<1,78>))

rascal>parseDateTime("2011/12/23/11/19/54", "YYYY/MM/dd/HH/mm/ss");
datetime: $2010-12-26T11:19:54.000+01:00$
[Edit] | [New Subconcept] | [Recompile Course] | [Warnings] 1 warning in this concept
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit