public void spssConvertDate() { const double expectedDate = 12598070400.0; double spssDate; SpssSafeWrapper.spssConvertDate(1, 1, 1982, out spssDate); Assert.Equal(expectedDate, spssDate); }
private static double ConvertDateTimeToDouble(DateTime value) { double d, t = 0; SpssSafeWrapper.spssConvertDate(value.Day, value.Month, value.Year, out d); double seconds = (double)(value.Second) + (value.Millisecond / 1000.0); SpssSafeWrapper.spssConvertTimeImpl(0, value.Hour, value.Minute, seconds, out t); double total = d + t; return(total); }