#1 2022-06-02 04:09:17

Johann
Member
Registered: 2022-05-30

Extract Year and Month from Today's Date

${today} give's me today's date. How can I just extract the year and month and display something like "202206" instead of "20220602"?

According to the documentation, there does not seem to be a method for obtaining year and month individually: https://reportserver.net/en/guides/user … te-Format/

Offline

#2 2022-06-07 08:47:14

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Extract Year and Month from Today's Date

Hi Johann,

you can use the format() function as explained here: https://reportserver.net/en/guides/user … -language/
The masks are available here: https://reportserver.net/en/guides/user … te-Format/
For example, ${today.format('y')}

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB