Hello,
Can we format a date as a week number (iso 8601) via Docentric Design?
Thank you
Patrick
Hello,
Can we format a date as a week number (iso 8601) via Docentric Design?
Thank you
Patrick
Hello @patrick.do, and welcome to Docentric forum.
While it is not possible to directly format a date as a week number on the template level, it is possible to do so in X++ and introduce the week number as a new data field.
To convert a date to a week number, please follow Microsoft’s documentation:
Look at the wkOfYr()
method and the code example.
You can also use the Global::weekOfYear
(date) method.
You then need to add the new data field (e.g., @WeekNumber) to the report data source, and you will be able to use it on the template.
Hi Patrick, that sounds like a good plan!
If you have any insights or experiences to share after implementing it, feel free to contribute to the forum. Your input can be valuable for others. Thanks and have a wonderful day!