Use datetime datatypes with datediff/dateadd functions.

-----Original Message-----
From: Jeff Small [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 11:58 AM
To: CF-Talk
Subject: Quick Question, RE: Datatype and future date/time calculations

Let's say a table was going to contain "AllocatedTime" which would be the
total time allocation for a task, say...an hour, possibly 8, maybe 16, maybe
even a half hour or 45 minutes...you get it, a range of hours and minutes,
and another table was going to contain separate entries to track progress
and "Time Used"...the idea being at any given time, I could query for
"allocated time", subtract the sum of all "used time" to easily display
"remaining time".

My question is, do you define the datatype in the database as a datetime
object? and just ignore the date portion to do the time calculations? or do
you use some sort of other method to calculate pure hours as a measure of
time spent doing something and not a "time of day"?

Does this make sense? I've tried looking it up, but I'm not finding what I
need anyplace. If it helps, I'm using SQL Server 2000.
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to