RemoveTicks

public static DateTime RemoveTicks(this DateTime value, long quantity)
{
     return value.AddTicks(quantity * -1);
}
Example:
public static void Main()
{
     Console.WriteLine(DateTime.Today.RemoveTicks(864000000000));
     //Will Write 7/19/2018 12:00:00 AM
}

Description

Legible way to remove ticks from a datetime. Use instead Add negative days

Details

Double click on the code to select all.

 

;