I’ve spotted what I believe is a bug - but maybe I’m doing something wrong? - when trying to use the Execution time from a Date&Time input node.
My use case is that I want to add a column that shows the current date/time. To do this I:
- Get the current time from a Date&Time input node.
- Connect the flow variable output to a Constant Value Column and append a new column taking value from the flow variable.
- I then use the String to Date&Time node to convert the value to a local date time. [NOTE: Because the flow variable output is a string it seems that I’m forced to use the ‘String’ value setting in the Constant Value Column, which then forces me to do this step]
9 times out of 10 this works, but when the milliseconds of the current time end in a zero the flow variable only outputs 2 digits for the milliseconds (ie. 0.650 seconds is outputted as 0.65), which then causes the String to Date&Time node to fail with the following error:
ERROR String to Date&Time 0:2140 Execute failed: Failed to parse date in row 'Row0: Text '2022-03-10T09:09:33.65' could not be parsed, unparsed text found at index 19
I’ve managed to do a workaround to reduce the granularity to seconds (which in my case doesn’t matter) but it’s clunky - see below screenshot that shows at the top what I tried first (but fails 1 in every 10 attempts), and then at the bottom my workaround.
And the workflow is as follows:
DateTime_Intermittent_Error.knwf (31.9 KB)
Am I doing something wrong or is this a bug?