Change the date variable to two days before

I would like to change this code, so that you register two days before and not after

DateTime.ParseExact(row(“Fecha”).ToString.SubString(0,10),”dd.MM.yyyy”,System.Globalization.CultureInfo.InvariantCulture).AddDays(2).ToString(“yyyyMMdd”)

hope you can help me

1 Like

Yah you were almost done
For before dat we must mention the AddDays in - value
Like this
AddDays(-2)
So the expression be like this

DateTime.ParseExact(row(“Fecha”).ToString.SubString(0,10),”dd.MM.yyyy”,System.Globalization.CultureInfo.InvariantCulture).AddDays(-2).ToString(“yyyyMMdd”)

Cheers @borismh

1 Like

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