How to Substract a day from date?

Hi guys,
How can I substract date?

for example ,
I want to Get Dec 19 from Dec 20.

How can I get?

If you can use the following formula:

yourvariable.ToLocalTime.AddDay(-1).ToString(your date format)

make sure your variable is of type DateTime


Thanks for your reply…
I got it bro:grinning:

1 Like


1 Like

Thanks you for your reply bro :slightly_smiling_face:

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