Hello all,
I am getting the following error message: Unable to process template language expressions in action 'Set_TheDate_2' inputs at line '0' and column '0': 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
I am trying to get a date into a numeric representation like Excel uses. I am initializing the variable TheDate (1) as type Float (2). I also am initializing a variable called TempDate (3) as type string (4) with the date entered (5). In order to convert it I am using the float function on the variable TempDate (7) and the result is suppose to be in TheDate (6). It is at step 6 I am getting this error.
Any help here would be appreciated.
Solved! Go to Solution.
Hi @AutomateFusion,
The reason it is failing is because your string value simply is not a floating-point number, it is a datetime string value.
You can even check that now with the new isFloat function
isFloat('2022-09-26T13:55:32.0000000Z')
I think in your case you might want to use a ticks function instead. Ed Gonzales has a nice article about ticks:
https://www.flyingpolymath.com/post/moving-targets
This helped me to get on the right track. I had to basically convert the excel data to a float variable and then compare it to a variable - I initialized the string variable (Yesterday) with the following: startofday(adddays(utcnow(),-1)) and then initialized the float of 'Yesterday' by using this: ticks(variables('Yesterday')). I was then able to figure out if the Excel row was created on a day great than the beginning of yesterday. Thanks
Hi @AutomateFusion,
The reason it is failing is because your string value simply is not a floating-point number, it is a datetime string value.
You can even check that now with the new isFloat function
isFloat('2022-09-26T13:55:32.0000000Z')
I think in your case you might want to use a ticks function instead. Ed Gonzales has a nice article about ticks:
https://www.flyingpolymath.com/post/moving-targets
This helped me to get on the right track. I had to basically convert the excel data to a float variable and then compare it to a variable - I initialized the string variable (Yesterday) with the following: startofday(adddays(utcnow(),-1)) and then initialized the float of 'Yesterday' by using this: ticks(variables('Yesterday')). I was then able to figure out if the Excel row was created on a day great than the beginning of yesterday. Thanks
User | Count |
---|---|
89 | |
41 | |
22 | |
20 | |
16 |
User | Count |
---|---|
130 | |
51 | |
48 | |
36 | |
26 |