Need an help on getting last date of month

Hello everyone,

How to take the last date of month?

Hi @Marian_B

Try this below expression

Use assign activity

Any Year → Now.Tostring("yyyy")

Any Month → Now.Tostring("MM")

Final Result → DateTime.DaysInMonth(Any year, Any Month).ToString

Regards
Gokul

2 Likes

Hi @Marian_B ,

Could you try this?

New DateTime(Today.Year,int_month+1,1).AddDays(-1)

Kind Regards,
Ashwin A.K

Hi @Marian_B

This could help

(New DateTime(Today.AddMonths(1).Year,Today.AddMonths(1).Month,1)).AddDays(-1).toString(“MM/dd/yyyy”)

grafik

LastDayInMonth = testDate.AddDays(- testDate.Day + 1).AddMonths(1).AddDays(-1).Date

1 Like

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