Public Function DotNetDateTimeToVBTime(ByVal inDotNetDateTimeInTicks As Double) As Date
    On Error GoTo finish
    Const hundrednanosecondsPerSecond = 10000000
    Const vbEpochInDotNetDateTimeTicks = 5.99264352E+17
    Dim diffTicks As Double: diffTicks = inDotNetDateTimeInTicks - vbEpochInDotNetDateTimeTicks
    Dim dSeconds As Double: dSeconds = diffTicks / hundrednanosecondsPerSecond
    Dim dStart As Double: dStart = dSeconds / (60# * 60# * 24#)
    Dim vbResult As Date: vbResult = dStart
    DotNetDateTimeToVBTime = vbResult
End Function

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.