How to get previous month last date (year = Buddhist era)

I want to get last date of previous month
Format = ddMMyy
Example 280265 ( year in Buddhist era = Christian Era + 543)

Please guide me about it.

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Replace(New DateTime(Now.Year,Now.Month,1).AddDays(-1).ToString("ddMMyy"),"\d{2}$",Function(m) ((Int32.Parse(m.Value)+543) mod 100).ToString("00"))

Regards,

@Yoichi It show 220228 .

image

I want output show 280265

Hi,

In my environment, it shows 280265 as the following image.

Can you check the following xaml?

Sequence.xaml (5.4 KB)

Regards,

1 Like

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