Hi
** difference in days .. nDays is calculated as
nDays = CTOD(fldToDate)-CTOD(fldFromDate)
Unfortunately, there is no function built in foxpro ver 2.6 for the time calculation. However you can do a calculation.. by striping the time field..
You can use SUBSTR() function to strip the TIme field to
chrs, cMinutes and cSeconds. Convert it to numeric using VAL(cHrs) etc and get numerical figures.. nHrs, nMinutes and nSeconds.
Then
startTime = (nHrs*60*60)+(nMinutes*60)+(nSeconds)
EndTime = (nDays*24*60*60)+(nHrs*60*60)+(nMinutes*60)+(nSeconds)
Difference = EndTIme-StartTIme && in seconds
Convert back to days, hrs, minutes and seconds.
If you are starting a new application.. think of using VFP where you have a dateTime variable and difference gives the
seconds between them. That is so easy.
Hope this helps you

ramani

(Subramanian.G),FoxAcc, ramani_g@yahoo.com