Last day of last month

I want to write last day of last month. Example 31-10-22. Could anyone please kindly help.

HI @Sabbir_Anwar

Try with this expression

New DateTime(Now.Year,Now.Month,1).AddDays(-1).ToString("dd-MM-yyyy")

Regards
gokul

image

Hi

How about the following?

New DateTime(Now.Year,Now.Month,1).AddDAys(-1).ToString("dd-MM-yy")

Regards,

Hello @Sabbir_Anwar
Try this

DateSerial(now.Year,Now.Month,0).ToString("dd-MM-yy")

image

1 Like

@Gokul_Jayakumar Thanks a lot

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