06-07-23 11:34 AM
Hi, I am having trouble with an error message that comes up after I add in the deferring code at this section of the training.
I don't know what this means in as far as the the type being text. I have gone back through the lessons to make sure I had everything right and I am pretty sure I do, but it still happens. The process runs fine when I delete the deferral code.
When I validate the code in the expression, it comes out fine, and shows the deferred time as what I would expect.
I have seen other threads about the time zone, but the error seemed to be different but not sure if this is impacting the problem?
Can anyone help?
Many thanks
Fran W
06-07-23 12:09 PM
Hi Fran,
Can you please share the screenshot of the Action stage where you are encountering the above error.
Regards,
Athiban
06-07-23 12:21 PM
Hi,
You need to pass defer time in the DateTime dataitem format to make it work. See below example,
I guess you are passing a text data item here.
06-07-23 01:15 PM
Hi Athiban, this is the action stage:
06-07-23 03:22 PM
If you evaluate your input you will notice it is in Text format and not in DateTime.
06-07-23 03:28 PM
Hi Tejaskumar
Thanks, I saw that but it seemed to be an automatic setting and I can't see how to change it. Is there a way to change it?
Thanks
Fran
06-07-23 07:45 PM
As others mentioned the defer until input parameter is expecting DateTime instead of text
So You can use calculation stage to Convert text to dateTime before using in ADD to Queue Action
1) Convert text to DateTime in Cal stage
Defer Until DataType should be DateTime
2) In Add to Queue action use Defer until DataType in Input parameter
12-07-23 04:28 PM
Hi Harish
Thanks for the steps, I have tried them and I get this error message:
I have also searched You Tube and there was an option to use an Environment Variable but I cannot see how to set that to 'today' + 5 mins.
I then Tried to work out how to convert today's date and time + 5 mins from text to DateTime type but couldn't work it out.
The expression is valid up to here, but when I validate, it still shows it as text. It hen wanted to use a conversion function but as soon as I put this next to it, the initial expression section becomes invalid:
I am not sure if I have just tried to do something that is too advanced for where I am in the training, but I can't really proceed without this working! I can't seem to find anything understandable to help work out how to use the functions and create expressions.
Many thanks for your continued help with this!!
Fran
12-07-23 05:04 PM
Hi Fran,
What is the data type you are using for "Time Today + 5 mins" and "Time Today + 5 mins converted"
I assume Time Today + 5 mins converted data type you are using is Date Time?
Looks like you have used some thing like this, with out space after date
Instead you need to use this "12/07/2023 16:37"
13-07-23 07:22 AM
Hi Fran,
As mentioned by other members, your expression will result in text. Convert your expression to datetime to make it work. Refer the screenshot.
Also deferring the items in work queue will be based on UTC to LocalTime. So, in order to defer the items to 5 minutes use the below expression.
Now() + MakeTimeSpan(0,0,5,0)