Attribute VB_Name = "cnv_DateLongConv"
Option Explicit
Option Base 0



Public Function DateToLong(Optional ByVal xDate As Date) As Long
  If Val(xDate) = 0 Then xDate = Date
  DateToLong = CLng(Fix(CSng(xDate))) + 693594
  End Function

Public Function LongToDate(ByVal DateID As Long) As Date
  LongToDate = CDate(CSng(DateID - 693594))
  End Function

