Get the last day of specific month

How to get the last day of a specific month??

ex. today is 02.03.2020, want the last day of November.
I tried like this but isn’t working:


broj-is the month(November)
argGodinaRacuna-year(2019)

1 Like

@JOHOHO

Try this:

                    System.DateTime.DaysInMonth(2019,November)
3 Likes

Ok, ty, that’s the way I got a correct day, but how can I now get the complete date

1 Like

@JOHOHO

     Int daysInMonth = System.DateTime.DaysInMonth(2019,November)

       lastDateInMonth = New Date(2019, November, daysInMonth)

where lastDateInMonth variable is of type date.

10 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.