Hi Claude.
>> Where I can find a function to calculate the time
between 2 dates ??? <<
As Mike and Ed have already said, you can get the number of seconds between 2 datetime values just by subtracting one from the other:
nElapsedSeconds = ABS( tDateTime1 - tDateTime2 )
I find that having the elapsed time in seconds is seldom very useful, so, here is a function that will return it for you in days, hours, minutes and seconds:
FUNCTION GetElapsedTime( tnElapsedSeconds )
LOCAL loObject
loObject = CREATEOBJECT( 'Line' )
WITH loObject
.AddProperty( 'nDays', INT( tnElapsedSeconds / 86400 ) )
.AddProperty( 'nHours', INT(( tnElapsedSeconds % 86400 ) / 3600 ) )
.AddProperty( 'nMins', INT(( tnElapsedSeconds % 3600 ) / 60 ) )
.AddProperty( 'nSecs', INT( tnElapsedSeconds % 60 ) )
ENDWITH
RETURN loObject
Marcia