This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Time Difference between two properties

Hello I need help with creating Time Difference property.

Property Values Examples:

Start Time: 02:57:37 PM
End Time: 02:58:01 PM

I have tried:

Option Explicit

CONST START_TIME_ID = 1213
CONST END_TIME_ID = 1214

dim StartDate_PV: set StartDate_PV = PropertyValues.SearchForProperty(START_TIME_ID)

dim EndTime_PV: set EndTime_PV = PropertyValues.SearchForProperty(END_TIME_ID)

if  ( NOT StartDate_PV.value.IsNull() ) AND ( NOT EndTime_PV.value.IsNull() ) THEN
  output = DateDiff( "d", StartDate_PV.value.value, EndTime_PV.value.value )
else

  output.SetValueToNULL MFDatatypeInteger

end if


But I'm getting Datestamp result: 12/30/1899 1:00 AM

Any solution to this?
Parents Reply Children
No Data