how to show months betweent two dates

3
hi team , i make a microflow in which user give start date and end date . Now i want to show on X-axix=> months and the respective years between the dates what user select. how i can get this? example- user select start date = 1-DEC-2022  & end date= 1-FEB-2023. so on x axis i want to show like this => DEC 2022  JAN 2023 FEB 2023 ---> x axis  
asked
2 answers
1

I have a bit trouble to understand your question but if I understand correctly you want to select a certain date range and show that data in a graph.

 

If that's the case then creating a helper object (helper entity) which you will populate with your data from the range you have selected can be the solution. Then you will create the graph based on the datapoints of the helper object. This is also much better for performance since your graph will only load the data that will be shown.

answered
1

Hi, 
I assume there is not default function for this, but you can implement custom java action to achieve this and store the values in a non persistable entity.
 


Java Actions for reference: https://stackoverflow.com/questions/63933494/how-to-get-list-of-months-between-two-dates-in-java

 

This link has the exact code which fits your case : https://www.roseindia.net/answers/viewqa/Java-Beginners/33022-list-of-all-months-between-two-dates-in-java.html

 

 

answered