Hi
I give it up: I have tried so many variations, but all date-related functions used with my date fields pulled from a csv file create an error message when trying to deploy the form.
When pulling that date field from csv, it has the format dd/mm/yyyy. Therefore, I have used a simple concatenate formula to change it into what I understand is the correct format to allow calculations with dates:
concat(substr(${imported_date},6,10),‘-’,substr(${imported_date},3,5),‘-’,substr(${imported_date},0,2)).
I create a note type filed to show the result and it looks like the date, I want to compare it with (entered at the beginning of the form):
raw: ${imported_date}, reformatted: ${imported_date_reformatted}, date: ${date}
Result:
The error message has a VERY STRANGE part:
type mismatch \nThe value \“ties-il-fa\” can't be converted to a date.
How does 2024-04-01 become ties-il-fa?
Complete message:
Unexpected KoBoCAT error 400: b’{“detail”:“ODK Validate Errors:\n>> Something broke the parser. See above for a hint.\nError evaluating field 'test7b' (${basics}[1]/test7b[1]): The problem was located in Calculate expression for ${test7b}\nXPath evaluation: type mismatch \nThe value \“ties-il-fa\” can't be converted to a date.\nCaused by: org.javarosa.xpath.XPathTypeMismatchException: The problem was located in Calculate expression for ${test7b}\nXPath evaluation: type mismatch \nThe value \“ties-il-fa\” can't be converted to a date.\n\t… 10 more\n\nThe following files failed validation:\n${tmp4a48nsrj}\n\nResult: Invalid”}’
Anybody and idea???