Hi all,
I’d like to ask if anyone is aware of a simple solution to get yesterday’s date.
So far I’ve been able to split a DateString into three variables to compile them in the following format: “dd.mm.yyyy”
It looks something like this:
- Day: DateString.ElementAtOrDefault(3) + DateString.ElementAtOrDefault(4)
- Month: DateString.Remove(2)
- Year: DateString.ElementAtOrDefault(6) + DateString.ElementAtOrDefault(7) + DateString.ElementAtOrDefault(8) + DateString.ElementAtOrDefault(9)
My date variable then consists of:
- Day + “.” + Month + “.” + Year
The problem I’m currently facing is in finding an easy way to also get yesterday’s date in the same format.
Any ideas?
Thanks!