Publicado Wed, 22 Mar 2023 09:05:09 GMT por Vorawooth Quang
How can I get the week number of any date?
Publicado Wed, 22 Mar 2023 10:13:14 GMT por Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hi Vorawooth Quang,<br> <br> in arithmetic expressions in the workflow designer you can use the DatePart function explained here:&#160;<a href="">DateAndTime.DatePart Method</a>.<br> For a list of all available functions, please see the Knowledge center <a href="">here</a>.<br> <br> Hope that helps.<br> <br> Greetings from Germany,<br> Simon H. Hellmann<br> DocuWare System Consultant
Publicado Thu, 23 Mar 2023 16:15:52 GMT por Vorawooth Quang
Sorry, but I can't manage to make the DatePart function working.
Publicado Fri, 24 Mar 2023 08:17:38 GMT por Gerardo Lisanti Team Leader Product Management
Hi&#160;Vorawooth,<br> <br> 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 &quot;numeric&quot; in DocuWare Workflows.<br> <br> I suppose you are trying to write to a field/variable of type &quot;text&quot;. For this you need to convert the returned value to a string using CStr().<br> So the expression looks like this:&#160;<code>CStr(DatePart(&quot;ww&quot;, GV_Date1))</code><br> <br> <br> Viele Grüße / With best regards,<br> --<br> Gerardo Lisanti<br> Product Manager &#160;| &#160;DocuWare GmbH
Publicado Fri, 24 Mar 2023 08:34:41 GMT por Vorawooth Quang
Hi Gerardo,<br> <br> Thank you for your help! It works perfectly now.&#160;

You must be signed in to post in this forum.