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;
ticks=dtInput.Ticks;
return ticks;
}
public static DateTime ConvertTicksToDateTime( long lticks)
{
DateTime dtresult = new DateTime(lticks);
return dtresult;
}
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).
haha copypasta’d vs copypasted.