Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to get number of days for a given month
=Day(Monthend(today(),-1))
=Day(Monthend(Makedate( YearField, MonthField)))
thank you Swuehl for your response. Can you please guide me on how to get number of days of previous month. For example current month is may and i need to get number of days for april
and to add one more twist is i have 3 years of data .But user will not select any year or month . But i need number days for the previous month. Thanks a lot for your help.
=Day(Monthend(today(),-1))
how to get number of days between year start date and PY month last day. as per above example i should get 120 days as my value.
I suggest that you look into the date and time functions in QV Help or manual. There are quite a lot of useful functions in QV.
Dates are just numbers (more precise, they have a dual value representation with a text and number part), so you can just calculate with the dates:
=ceil(Monthend(today(),-1))- yearstart(today())