Well, I have no idea what you are trying to accomplish ...but why not
take a swing in the dark ;-)
If your using SQL Server look into the "dateDiff" function. Say you have
two dates @date1 = '01/01/2001 01:00' and @date2 = '01/02/2001 02:00'.
dateDiff("hh", @date1, @date2) would return 25 because 25 hour
boundaries have been crossed between the two. If you are using another
database I'm sure their are similar facilities in them.
If you can be a bit more detailed I would help more.
-eric
------------------------------------------------
Common sense is genius dressed in its working clothes.
-- Ralph Waldo Emerson
Eric Barr
Zeff Design
(p) 212.714.6390
(f) 212.580.7181
-----Original Message-----
From: John McCosker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 11:16 AM
To: CF-Talk
Subject: date times
If there is anything I struggle with its dates and times:
What I'm trying to do is this.
Select a time from in my database.
SELECT DT, sessionStatus
FROM dbo.milford
WHERE SESSIONSTATUS = 1
SELECT DT, sessionStatus
FROM dbo.milford
WHERE SESSIONSTATUS = 0
There is a timestamp for every hour between start time and finish time.
a session will last for 24 hours at least, maximum 7 days.
We are timing a pump here.
Now how would I add up the hours here, any ideas would be appreciated??
Many thanx advance......
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists