DateAdd bad result

Discuss RoboTask here
Post Reply
WellWisher
Posts: 18
Joined: Mon Sep 26, 2016 10:29 am

DateAdd bad result

Post by WellWisher »

I need to add 2 dates:

Code: Select all

DateAdd("H",0,"{TIME}")
but in the action "Evalute" error "Bad result format" and right answer.
Also Variable "{LastErrorDescription}" not show result, but in the log show " Bad result format: #3:35:59 PM#"
How to pull out the answer in a variable?
Oleg
Site Admin
Posts: 3010
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: DateAdd bad result

Post by Oleg »

Use expression

Code: Select all

CStr(DateAdd("H",0,"{TIME}"))
It seems you are using Evaluate action. This is deprecated.
You can use VB Evaluate action. It can calculate the expression

Code: Select all

DateAdd("H",0,"{TIME}")
without problem
Oleg Yershov
WellWisher
Posts: 18
Joined: Mon Sep 26, 2016 10:29 am

Re: DateAdd bad result

Post by WellWisher »

Thanks you very much, both result is worked!
Post Reply