Skip to content
QiTASC.com / Troubleshooting /
Could Not Be Parsed at Index 0
/ .. /
Could Not Be Parsed at Index 0










Troubleshooting: Could Not Be Parsed at Index 0

This error messages appears if the parseDateTime() function's parameter mismatches the expected format. Detailed descriptions of this function can be obtained in the Date and Time Built-ins section.

The following example changes the current UTC's date format and then parses it to a different time zone. This will create the error message Could not be parsed at index 0 because of mismatching date formats.

Example

1
2
3
4
5
6
7
8
stepdef "parsedate"
    time := now("UTC")
    timeUTC := formatDateTime(time, "yyyy-MM-dd HH:mm:ss")
    println("time +0000 UTC: " + time + " ")
    println("+0000 UTC in another format: " + timeUTC)
    parsed := parseDateTime(timeUTC, "MM-yyyy-dd HH:mm:ss", "Europe/Vienna")
    println("+0200 UTC time parsed: " + parsed)
end