Hi @didate,
I’ve just tried it with the last android version (2.4.1) and it is working fine. This is the expression I’ve used:
d2:right(d2:left(V{current_date},7),2)
V{current_date} will return a date with the following format: yyyy-MM-dd. So the inner d2:left will return the first 7 characters from the left yyyy-MM and then the d2:right will return just MM which is what you are trying to achieve.
Dears, I faced with a problem regarding dashboard. I was trying to develop one data set in the dhis2 i did so and now i cant to open the dashbaord and give me thefollowing message:
ChunkLoadError: Loading chunk 6526 failed.
(missing: DHIS 2 Health Net TPO)
at Object.j (https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:518264)
at https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:509410
at Array.reduce (<anonymous>)
at Function.e (https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:509375)
at https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:616699
at https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:396551
at Es (https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:396700)
at Ol (https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:388664)
at Sl (https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:388589)
at gl (https://dhis-hni.com/dhis-web-dashboard/static/js/main.2080e0a3.js:2:385591)
in Unknown
in Suspense
in Jn
in div
in div
in nr
in Xe
in ke
in De
in Ze
in Ce
in et
in d
in X
in de
in G
in DHIS2RuntimeProvider
in lr
in rr
in Rn
in Jn
in ur
in hr
Following the discussion on program rule expression warning at “Expression is not valid” warning in program rules, please kindly note that the accepted solution for extracting day or month or year part of dates also results in “Expression is not valid”: