I have a multiple nodes with a date of the style: 2019-11-16
I want to get the month of theses dates, so far I tried this and some variations on this:
let $DATE:=data(//activity/DATE)
let $month:=substring($DATE, 6, 2)
return $month
But I have an error saying that the cardinality doesn't match the expected parameter,I know its a string related issue, if I insert manually a date like '1999-12-24' it returns the expected value but I need it to read the dates and then return them as indicated in the substring, any ideas? I thought that data("...") returned a string but it seems like it doesnt