So I found a programming blog where the writer indicated he needed to convert DateTime to ticks and vice versa. (This is in C#.)
He presents this:
public static long ConvertDateTimeToTicks( DateTime dtInput)
long ticks = 0;
public static DateTime ConvertTicksToDateTime( long lticks)
DateTime dtresult = new DateTime(lticks);
Why write a separate function for these as an example? It’s right there in .NET (unless he was supposed to wrap the functionality, and copypasta’d for convenience).