-2
I did that:
DateTime dt = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
int dias = (int)dt.Subtract(DateTime.Today).TotalDays;
If you make for today(26/01/2018) the result in var dias
is:
-25
I just wanted to know why it came negative, just really understand.
How much is 1 - 26?
– Jéf Bueno
Yes, I thought he’d take the current date and subtract it from day 1. But it’s the other way around.
– pnet
int dias = (int)DateTime.Today.Subtract(dt).TotalDays;
that would be the bill– pnet