投稿済み Wed, 22 Mar 2023 09:05:09 GMT 、投稿者 Vorawooth Quang
How can I get the week number of any date?
投稿済み Wed, 22 Mar 2023 10:13:14 GMT 、投稿者 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
投稿済み Thu, 23 Mar 2023 16:15:52 GMT 、投稿者 Vorawooth Quang
Sorry, but I can't manage to make the DatePart function working.
投稿済み Fri, 24 Mar 2023 08:17:38 GMT 、投稿者 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
投稿済み Fri, 24 Mar 2023 08:34:41 GMT 、投稿者 Vorawooth Quang
Hi Gerardo,

Thank you for your help! It works perfectly now. 

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