Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i have a month field as_month in database and the format in database is 01-jan-2019 etc etc
so i am tring to extract previous month
i did this in script
Month(as_month) as Month_N
and in text box object
i did this
max(Month_N) -1
so when i select jan i did not get dec .. i get sep
how i resolve this
You should rather use date field to get the previous month like:
Month(AddMonths(max(as_month), -1) )
This way, you could even get previous month from last year. However, if you use only month field, you might not easily get Dec when you are in Jan.
You should rather use date field to get the previous month like:
Month(AddMonths(max(as_month), -1) )
This way, you could even get previous month from last year. However, if you use only month field, you might not easily get Dec when you are in Jan.