Friday, February 17, 2012

DateDiff

Gentlemen
I need to find ou how much processing time has elapsed from the
begining of a query to the end of a query and update a datetime database
field with the results. DateDiff() would give me each part ( hours, min,
sec) but it will not give it all together.
How would you do this?
MarkWouldn't it make more sense to store the number of units elapsed (e.g. 546
MS or 32.4 seconds) or the start and end time separately (from which you can
always get a duration)?
I question changing a duration to a datetime value, I think this will be
very misleading.
If a query takes more than 24 hours, how do you plan on storing that? What
is the date portion of your value going to be, 1900-01-01?
If it's always going to be less than 24 hours (who knows, with some of the
stuff I've seen here), you can use something like this. But I still think
this is not a very appropriate use for this kind of formatting.
http://www.aspfaq.com/2271
"Mark Moss" <markmoss@.adelphia.net> wrote in message
news:OZTeTAZuFHA.4080@.TK2MSFTNGP12.phx.gbl...
> Gentlemen
>
> I need to find ou how much processing time has elapsed from the
> begining of a query to the end of a query and update a datetime database
> field with the results. DateDiff() would give me each part ( hours, min,
> sec) but it will not give it all together.
> How would you do this?
>
> Mark
>

No comments:

Post a Comment