182
Views
1
Comments
Solved
Show the month and year between range of 1990 till current year in Drop down
Application Type
Reactive

i have to display the month and year from 2000 jan to till current month and year (it should be above month of the current year)


exmple: Jan 2000 to Current month and year(august 2022) in Drop down

2016-04-22 00-29-45
Nuno Reis
 
MVP
Solution

Hello Ganeshkumar.

Usually I build months table with CTE or get them from an existing table.

On this case, I looked for a new approach.

I used the WITH to create a list of possible months.

For the years, I did similar, but generated all possible combinations of 4 digits.

Then I just match year/month inside the given dates and return that list.




On the oml you can see it at work with a demo page.

Months.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.