For the time conversion use the DateAdd Function like this:

#DateAdd("h", "1", yourdatetimehere)#. This will increment your date/time
value by 1 hour.  Adjust accordingly the amount...  Make sure that you are
passing a valid date AND time.  If you only pass the date, I beleive that it
will default to 12:00 am on the specified date.

As for the time table, I would use a bgcolor attribute and fill in that way.
Makes for cleaner code and less chance of leaving off a </tr> or something
like that which will blow up Netscape.

For each row, check and see if the time falls within the range of that
extracted from the DB.  Try the datecompare function:

#DateCompare(TimeinTable, TimeFromDBAppointment, "h")#.  
If the time in the table matches the timefromDBappointment, the function
will return a 0 so,

<CFIF DateCompare(TimeinTable, TimeFromDBAppointment, "h") EQ 0>
<td bgcolor="FFFF99"> // offsets the color to light yellow
<ELSE>
<td> //no background, or white...
</cfif>

HTH,

Jeff Garza
Webmaster,
Spectrum Astro, Inc.
[EMAIL PROTECTED]

-----Original Message-----
From: Yvette Ingram
To: CF-Talk
Sent: 3/25/01 7:56 AM
Subject: Converting Time

Hi:

I have really two problems.

Problem 1:  (Priority)
I need help converting "1 hr" to a time.
Say I have a meeting start_time of "9:00 AM" that runs for 1 hr.  I
haven't
calculated the meeting end_time.  What I want to do is convert the 1 hr
to
to an end_time to 1 hr later, i.e.,  "10:00 AM".

Problem 2:
I have a <table> with time slots vertically, say from 9:00 AM to 5:00
PM.  I
want the cell height to expand to cover the start_time (9:00 AM) to
end_time
(10:00 AM).

Thanks in advance.


Yvette Ingram
Brainbench Certified ColdFusion 4.5 Programmer
Email: ingramrecruiting@erols or
[EMAIL PROTECTED]
ICQ:  21200397
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to