Hi,
The following formula gives me an error:
numbervar mindiff;
if isnull({PATDRUG.PRESC_TIME})or
trim({PATDRUG.PRESC_TIME}) in [":",""] or
isnull({PATDRUG.START_TIME})or
trim({PATDRUG.START_TIME}) in [":",""] then
mindiff := 0 else
mindiff := datediff("n",datetime(currentdate, time({PATDRUG.APPT_START})),datetime(currentdate,time({PATDRUG.START_TIME})));numbervar hrs := truncate(mindiff/60);
numbervar mins := remainder(mindiff,60);
if mindiff = 0 then
"" else
totext(hrs,"00")+":"+totext(mins,"00")
The Error appears highlighting this line
time({PATDRUG.APPT_START})
I think it may be due their being no time in this field and the formula outputs ""... ?
Sorry I didnt write the formula so I dont completely understand it
Any ideas ?
Steve
The following formula gives me an error:
numbervar mindiff;
if isnull({PATDRUG.PRESC_TIME})or
trim({PATDRUG.PRESC_TIME}) in [":",""] or
isnull({PATDRUG.START_TIME})or
trim({PATDRUG.START_TIME}) in [":",""] then
mindiff := 0 else
mindiff := datediff("n",datetime(currentdate, time({PATDRUG.APPT_START})),datetime(currentdate,time({PATDRUG.START_TIME})));numbervar hrs := truncate(mindiff/60);
numbervar mins := remainder(mindiff,60);
if mindiff = 0 then
"" else
totext(hrs,"00")+":"+totext(mins,"00")
The Error appears highlighting this line
time({PATDRUG.APPT_START})
I think it may be due their being no time in this field and the formula outputs ""... ?
Sorry I didnt write the formula so I dont completely understand it
Any ideas ?
Steve