投稿済み Mon, 30 Jul 2018 07:49:22 GMT 、投稿者 Nathan Wilkins

Good Morning,

Wondering if anyone can help, we are trying to validate a Date Difference Expression we will be using within a Workflow to calculate days within a date range:

DateDiff ("w",GV_Start_Date, GV_End_Date)

We have tried it with integer and we are getting the same error.

Has anyone used similiar integrations/expressions?

The below forum post refers back to the expression we are trying to validate:

https://www.docuware.com/forum/english-forums/docuware-questions-about-u...

Any information would be greatly appreciated.

 

https://www.docuware.com/sites/default/files/forums-images/DateDiff_2.png

投稿済み Mon, 30 Jul 2018 10:56:49 GMT 、投稿者 Phil Robson DocuWare Corporation Senior Director Professional Services, Americas

DateDiff requires 2 dates and will return a long value. Ensure that GV_Start_Date and GV_End_Date are Date Type variables and not string variables. Also, you are using Weeks and if the result is less than a week then I think DateDiff will return 0.

 

 

Phil Robson
Senior Director Support Americas

 

投稿済み Mon, 30 Jul 2018 11:39:12 GMT 、投稿者 Nathan Wilkins

We have tried W & D as the value.... The string it is referring to is the DocuWare Global Variable that we are trying to send the value back to.... IF we push it to an integer we get the same error as pushing it back to a text field... DateDiff returns in a Long format which seems to be causing the problem rather than the GV's.... Any idea's how we could convert that long format to int/string?

投稿済み Mon, 30 Jul 2018 12:08:33 GMT 、投稿者 Phil Robson DocuWare Corporation Senior Director Professional Services, Americas

Ok. Let's try to reassign the variable on the fly:

CINT(DateDiff("d",This_Date,That_Date))

Will convert the LONG result to an integer.

CSTR((DateDiff("d",This_Date,That_Date))

to convert to a string.

 

Phil Robson
Senior Director Support Americas

 

 

フォーラムに投稿するためにはログインが必要です。