I have a value of type Date, inside two arrays. First array has only one value, Second array has multiple values. When I try to evaluate their typeOf(), I get 54 (Date with Timezone) for first one, & I get 7 (Date) for second one.The question is, why does the data type change for todate(now()) in first and second array ?Code:
a!localVariables( local!singleItem: { todate(now()) }, local!listOfVariant: { 2, todate(now()) }, { typeOfSingleItem: a!forEach( items: local!singleItem, expression: typeof(fv!item) ), typesOfListOfVariant: a!forEach( items: local!listOfVariant, expression: typeof(fv!item) ) } )
Discussion posts and replies are publicly visible
It's hard to say for sure, but it seems like the "List of Variant" type does not support items of type "Date and Timezone", so they get converted to the regular "Date" type. I generally try to avoid List of Variant if possible because it often causes unexpected behavior like this
As Dan Lluhi said, sometimes the variant list has different behavior.
In your case, you can check that by changing the first component of the second array, the returned type is again 54.
While I know that there is Date and Date with Timezone, did you guys see any difference in behaviour of these two types? I did not.