Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I wanted to set Dynamic default bookmark as previous month compare to system date but my expression is not working
=J&J Calendar Month = Date(Addmonths(Today(), -1), 'MMMM') where J&J Calendar Month is my field name
Can anyone help me on this.
Thanks,
Regards,
Nandita
Hi Nandita,
You can try this:
=[J&J Calendar Month]=Month(MonthStart(Today()-1))
AddMonths would return 17/06/2023, while MonthStart returns 01/06/2023 and it is more useful for month comparisons.
Regards
Cezário
Thank you Satish it is working for me only thing I had to change it to like this since my Month value was in full name like January, February etc.
=Num(Month(Date#([J&J Calendar Month],'MMMM'))=num(month(date(addmonths(today(),-1),'DD/MM/YYYY')))
Thanks a lot 🙂
Hello @Nandita27,
Try this,
=Num([J&J Calendar Month])=num(month(date(addmonths(today(),-1),'DD/MM/YYYY')))
Note: Change Date format if it is not same in your date field.
Hi Nandita,
You can try this:
=[J&J Calendar Month]=Month(MonthStart(Today()-1))
AddMonths would return 17/06/2023, while MonthStart returns 01/06/2023 and it is more useful for month comparisons.
Regards
Cezário
Thank you Satish it is working for me only thing I had to change it to like this since my Month value was in full name like January, February etc.
=Num(Month(Date#([J&J Calendar Month],'MMMM'))=num(month(date(addmonths(today(),-1),'DD/MM/YYYY')))
Thanks a lot 🙂
Thanks a lot Cezario for your suggestion. Since my month value was in full name I had to change it as below and it is working for me
=Date(MonthStart(Today(),-1),'MMMM')
Anyway later my customer changed the requirement like Dynamically need to select from January to Last Month(i.e as of today till June) instead of only selecting June so I have implemented as below
=Num(Month(Date#([J&J Calendar Month],'MMMM'))<=num(month(date(addmonths(today(),-1),'MM/DD/YYYY')))
Thanks again. Appreciating your help!!
Regards,
Nandita