v1. *, Datediff (ss, v1.dateofchange, v2.dateofchange) vActualTime Join V1 left as acutaltime the vicutualtime v1 v2.rowno = v2.rowno-1 FK_PatientId FK_Status_PatientId Tithif Change rowno acutaltime -------- ---- ------------------- -------------------------- ---------------- -------- --- 3 16 2010-08-02 15: 43: 46,000 1 757 3 24 2010-08-02 15: 56: 23.000 2 96 3 26 2010-08-02 15: 57: 59.000 3 umbilical
I am using SQL server 2005 am
when I write I
select v1 *, Datediff (mi, v1.dateofchange, v2.dateofchange) Vitaittaim V1 from [date] as joining vActualTime v2 on v1.rowno = v2 as Attyutataim, (datetime, datediff (mi, v1.dateofchange, v2 .dateofchange), 108).
I get it
FK_PatientId FK_Status_PatientId DateofChange off Sittaim Date ------------ ------- ------------ ---------- ------------- --------------- ----- ---------- - ------ ----------------- 3 16 2010-08-02 15:43: 46.000 1 13 19 00-01-14 00: 00: 00.000 3 24 2010-08-02 15: 56: 23.000 2 1 9 00-01-02 00: 00: 00.000 3 26 2010-08-02 15: 57: 59.000 3 Tap faucet
It should have been given as 00-00 -00 00: 13: 00: 0000
I think you need to take your calculation minutes (you are dated) and display that 108 in a time format.
This minute is a datetime format of 108, i.e. hh: mm: ss
convert (negotiation, dateaid (min, dated (mi, v1.dat) Select Eofchange , V2.dateofchange), '00: 00: 00 '), 108)