Publié Wed, 22 Mar 2023 09:05:09 GMT par Vorawooth Quang
How can I get the week number of any date?
Publié Wed, 22 Mar 2023 10:13:14 GMT par 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="https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.dateandtime.datepart">DateAndTime.DatePart Method</a>.<br> For a list of all available functions, please see the Knowledge center <a href="https://help.docuware.com/#/home/64352/2/2">here</a>.<br> <br> Hope that helps.<br> <br> Greetings from Germany,<br> Simon H. Hellmann<br> DocuWare System Consultant
Publié Thu, 23 Mar 2023 16:15:52 GMT par Vorawooth Quang
Sorry, but I can't manage to make the DatePart function working.
Publié Fri, 24 Mar 2023 08:17:38 GMT par 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
Publié Fri, 24 Mar 2023 08:34:41 GMT par 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.