Time difference for variables

Hello Everyone:

I have an issue. I am reading values from a csv file putting them into an array and then since they are time values I am trying to calculate the difference but I may be doing something wrong because the value I get is always less than 0.

Here is the code I am using.

For z = 0 To Ubound(ListArray,1)

If Isdate(listarray(z,2)) And Isdate(listarray(z,3)) Then

'We have dates now we can calculate the difference

listarray(z,9) = Str(Cdat(listarray(z,3)) -  Cdat(listarray(z,2)))

Else

listarray(z,9) = “0”

End If

Please give me some advise!!!

Thanks

Subject: Time difference for variables

I take it you were expecting a “number of seconds” result, such as you’d get in Formula Language or if you had used TimeDifference with NotesDateTime objects. You are, however, using LotusScript Date variants, where whole numbers indicate the number of days, and fractions are the fractions of a day, so a time difference of less than a day will always be less than 1. To get the number of hours, multiply by 24. To get minutes, multiply by 2460. To get seconds, multiply by 2460*60.

Subject: RE: Time difference for variables

Subject: RE: Time difference for variables

Thanks, that explains everything.