Last Date previous month?

I want show last Date previous month (Format dd MMMM (in thai) yyyy (in Buddhist calendar)

Example today 15/4/2022 —> expected output 31 มีนาคม 2565

Please guide me about it.

use this
Now.AddDays(-(DateTime.Today.Day-1)).AddDays (-1).ToString("dd MMMM yyyy", New System.Globalization.CultureInfo("th-TH"))

Example
image

result
31 มีนาคม 2565

1 Like

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