Search results

  1. X

    Date difference between rows in same column

    as always thank you for your quick response. I actually figured it out today. XThai
  2. X

    Date difference between rows in same column

    Hi CJ, thank you for your quick response. Your codes work beautifully. I made minor changes to TherapyDays to make them positive values and change the INR>=2 to the target goal which is 2 to 3. SELECT DateDiff('d',SDate,(SELECT Min(SDate) FROM QryWarfarinDueRpt as Tmp WHERE...
  3. X

    Date difference between rows in same column

    Thank you very much CJ for suggestions. I managed to modify your codes to calculate Minimum date for each patient by this code: MinDate: (SELECT Min(SDate) FROM QryWarfarinDueRpt as Tmp WHERE VisitID=QryWarfarinDueRpt.VisitID) and use DateDiff("d",[MinDate],[sdate])+1 to calculate Day of...
  4. X

    Date difference between rows in same column

    Dear members, I have the below query (A). How do I calculate the Day of Therapy as shown in B A MRN Last Name DOA Service startDate INR Dose WarfID VisitID 12001 Smith 6/28/2013 Warfarin 6/29/2013 1.20 6 mg 10...
Top Bottom