Convert(Varchar,CompletedDT,108) Would put the DT info into your 48:22:11 example
I also have two several machines where I compute differences between start and stop time which are returned to me by sql in the form of datetime, but I render the results to the user in hours. Here is how I do it:
Format$(DateDif"n",View_PdateLiveLines.FirstLayerD T,View_PdateLiveLines.LastLayerDT)/60,"##.0")),"") AS TotalRunningHours
This just uses the DateDiff function and returns the difference between start and stop time in minutes "n". Then, I divide by 60 to put it in hours and throw a formate around the whole thing in numeric decimals.
Let me know if this helps, I could look into some other areas of my code where I have done other similar functions.
Coby.
|