My task is to get quantity of Days when I subtract the Current Date from a fixed date.
<script language="C#" runat="server">
System.DateTime thisDay = DateTime.Today;
System.DateTime dateCountFrom = new DateTime(2016, 6, 1, 0, 00, 00);
</script>
So I have 2 dates and everything is working perfectly. But how can I subtract one from the other?
(dateCountFrom-thisDay).totaldayscount;
causes an error, tried other ways - same result.
I succeeded only by doing this:
<%= ((DateTime.Now-(new DateTime(2016,6,1))) *-1).TotalDays %>
But I need to eval result and multiply by -1.
Any ideas how I can do this?