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?

Hi,
If you can use the following formula:

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

make sure your variable is of type DateTime

2 Likes

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

1 Like

DateTime.Now.AddDay(-1).Tostring(Dateformate)

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.