Jeff Small wrote:

> Okay, so let's say you're using SQL Server

> So, how *do* you store times if you want to add them and have the math work
> right?
> (For example (1:45 + 1:45)$10/hr = $35...like that)

Since I generally use databases that understand the interval
datatype I prefer to shift everything to the database because it
is much easier to deal with than in CF. Just define a field as
interval and insert strings like '1 hour 13 minutes' or '5 hours
12 seconds' and it automagically works, including regular math
and statistical stuff.

Unfortunately MS SQL Server does not have an INTERVAL datatype so
for now I would second the suggestion to convert all your values
to seconds and store them in an integer field. And of course fill
out http://register.microsoft.com/mswish/suggestion.asp :-)

Jochem
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to