Navigation
Synopsis Parse an input time given as a string using the given format string.
Function datetime parseTime(str inputTime, str formatString)
Usage import DateTime;
Examples
rascal>import DateTime;
ok
rascal>parseTime("11:21:19.860+01:00", "HH:mm:ss.SSSZZ");
|rascal://DateTime|(11367,326,<517,0>,<528,64>): DateTimeParsingError("Cannot parse input date: 11:21:19.860+01:00 using format string: HH:mm:ss.SSSZZ")
	at *** somewhere ***(|rascal://DateTime|(11367,326,<517,0>,<528,64>))
	at parseTime(|stdin:///|(32,16,<1,32>,<1,48>))


rascal>parseTime("11/21/19", "HH/mm/ss");
datetime: $T11:21:19.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 ask.rascal-mpl.org.