mutley1
MIS
- Jul 24, 2003
- 909
Hi guys,
I had a read through the useful date time items as always, but cant work this one out. I have 2 fields that are datetime for a diabetic - bloodlasteaten and blooddate (when blood is drawn). What i also have is a computed column giving hours between the blood being drawn and the time last eaten. All works fine.
Is there a way to get hours and minutes difference without having to do 2 parts to the statement, as I want to have it (preferably) as a computed column (int currently).
Code:
(datediff(hour,[BloodLastEaten],[BloodDate]))
I have tried a convert decimal (5,2) but it till comes out as a whole number. Either 7.75 or 7:45 for 7 3/4 hrs would be fine, just can it be done as a computed column or do i have to trigger an update where the workings are split into 2 parts?
TIA Guys
M.