Notes Datetime prob

Hi I have 2 date/time fields.I want to show the diff of these 2 fields in days-hr-min format like x days y hr z min.How can do this using formula language and lotus script???

In formula I have written the following code–

year := @Year(@GetField(“SCAssignOnDate”));

month := @Month(@GetField(“SCAssignOnDate”));

day := @Day(@GetField(“SCAssignOnDate”));

hour := @Hour(@GetField(“SCAssignOnTime”));

minutes := @Minute(@GetField(“SCAssignOnTime”));

seconds := @Second(@GetField(“SCAssignOnTime”));

newDateTime := @Time(year; month; day; hour; minutes; seconds);

days:=@Abs(@Integer((SCSolveDate - newDateTime) / (86400)));

hours:=@Abs(@Integer((SCSolveDate - newDateTime) / (3600)));

min:=@Abs(@Integer((SCSolveDate - newDateTime) / (60)));

@Text(days)+" days “+@Text(hours)+” hour “+@Text(min)+” minute"

But this doesnot give the correct result??Pls suggest me how should I proceed…

Subject: Notes Datetime prob

timeDiffSeconds := @Abs(SCSolveDate - SCAssignDate);seconds := @Modulo(timeDiffSeconds; 60);

timeDiffMinutes := (timeDiffSeconds - seconds)/60;

minutes := @Modulo(timeDiffMinutes; 60);

timeDiffHours := (timeDiffMinutes - minutes)/60;

hours := @Modulo(timeDiffHours; 24);

days := (timeDiffHours - hours)/24;

@Text(days) + " days, " + @Text(hours) + " hours, " + @Text(minutes) " minutes"