How to Get the previous day (ddMMYYYY)-1?

Need to have the previous day

Datenow : 12/09/2021
Result : 11/09/2021

Hey,
you can use:
yourDateVariable.AddDays(-1)

4 Likes

Date.Now.AddDays(-1).ToString(“ddMMyyyy”)

Should do the trick

2 Likes

Hi @Soudios

Now.Adddays(-1).toString(“dd-MM-yyyy”)

Regards

1 Like

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