I need help with a date/time formula. I have two formulas that give me two different date and time. One date/time is when the medication was originally ordered and the second date/time is when the medication was redispensed by the pharmacy. I need to get the difference between these two dates/times in the form of days, hours, and minutes, i.e, 8d 17h 32m. Is this possible? I have tried using the DateDiff formula and it only give me hours, i.e., 143.00. This is the formula I am trying (unsuccessfully) to use:
If DateDiff("d",{@OrderDate},{@RXActionInstant})> 1
then DateDiff("d",{@OrderDate},{@RXActionInstant}) +
DateDiff ("h",{@OrderDate},{@RXActionInstant})+
DateDiff ("m",{@OrderDate},{@RXActionInstant})
else
DateDiff ("m",{@OrderDate},{@RXActionInstant})
FYI:
{@OrderDate}=
If {ZC_DISP_TYPE.DISP_TYPE_C} = 8
then
{ORDER_MED.ORDER_INST}
{@RXActionInstant}=
If {ZC_DISP_TYPE.DISP_TYPE_C} = 8
then
{ORDER_DISP_INFO.ACTION_INSTANT}
Hope you can help,
pj2256
If DateDiff("d",{@OrderDate},{@RXActionInstant})> 1
then DateDiff("d",{@OrderDate},{@RXActionInstant}) +
DateDiff ("h",{@OrderDate},{@RXActionInstant})+
DateDiff ("m",{@OrderDate},{@RXActionInstant})
else
DateDiff ("m",{@OrderDate},{@RXActionInstant})
FYI:
{@OrderDate}=
If {ZC_DISP_TYPE.DISP_TYPE_C} = 8
then
{ORDER_MED.ORDER_INST}
{@RXActionInstant}=
If {ZC_DISP_TYPE.DISP_TYPE_C} = 8
then
{ORDER_DISP_INFO.ACTION_INSTANT}
Hope you can help,
pj2256