Posted Wed, 22 Mar 2023 09:05:09 GMT by Vorawooth Quang
How can I get the week number of any date?
Posted Wed, 22 Mar 2023 10:13:14 GMT by Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hi Vorawooth Quang,

in arithmetic expressions in the workflow designer you can use the DatePart function explained here: DateAndTime.DatePart Method.
For a list of all available functions, please see the Knowledge center here.

Hope that helps.

Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant
Posted Thu, 23 Mar 2023 16:15:52 GMT by Vorawooth Quang
Sorry, but I can't manage to make the DatePart function working.
Posted Fri, 24 Mar 2023 08:17:38 GMT by Gerardo Lisanti Team Leader Product Management
Hi Vorawooth,

you are almost there. The DatePart() function returns a Variant (Integer). That means you can write the returned value to a field/variable of type "numeric" in DocuWare Workflows.

I suppose you are trying to write to a field/variable of type "text". For this you need to convert the returned value to a string using CStr().
So the expression looks like this: CStr(DatePart("ww", GV_Date1))

Viele Grüße / With best regards,
Gerardo Lisanti
Product Manager  |  DocuWare GmbH
Posted Fri, 24 Mar 2023 08:34:41 GMT by Vorawooth Quang
Hi Gerardo,

Thank you for your help! It works perfectly now. 

You must be signed in to post in this forum.