A tick is 10,000 milliseconds, and C# considers the beginning of time January 1, 0001 at midnight. Here's a one-liner which expresses this using Java 8's java.time.*
public static long toTicks(Instant i)
{
return Duration.between(Instant.parse("0001-01-01T00:00:00.00Z"), i).toMillis() * 10000;
}