Hi there

Almost have it working

<cfset finishdate = #CreateODBCDateTime(form.startdate)#>
<cfoutput>Date is: #dateformat (finishdate, "DD-MMM-YYYY")#<br />
Time is: #timeformat(finishdate, "hh:mm:ss")#<br />
<strong>#DateAdd('h', 1, finishdate)# </strong><br /><br />

New finish date is: #dateformat (finishdate, "DD-MMM-YYYY")#

#timeformat(finishdate, "hh:mm:ss")#<br />
<cfset finishdate1 = #CreateODBCDateTime(finishdate)#>

New finish date is: #dateformat (finishdate1, "DD-MMM-YYYY")#<br />
<br />
#timeformat(finishdate1, "hh:mm:ss")#<br />
</cfoutput>

Where I have this line:\

<strong>#DateAdd('h', 1, finishdate)# </strong><br /><br />
 the date displays correctly advancing 1 hour or advancing the specified time.  
But when I go to use thge date later in the program it reverts back to the 
original date.

Any ideas would be helpful.

Thanks



> Hi there
> 
> In an application I have a page where a user can select how long an 
> event goes - i.e. 30 minutes, 45 minutes, 60 minutes etc.
> 
> In the MySQL database that I have two fields a starttime and a 
> finishtime.
> 
> Currently I have the following sql to update the database
> 
> UPDATE tbl_bookings
> SET starttime =       #CreateODBCDateTime(form.startdate)#,
    
> finishtime = #CreateODBCDateTime(form.startdate)#,
    
> bookingstatus = '2'
> Where bookingid       = '#form.bookingid#'
> 
> This is at least giving me data in the finishtime column.  What I am 
> trying to do is use the value selected by the user i.e. 30, 45, 60 etc 
> and add it to the starttime to get the finishtime but I have not 
> succeeded.
> 
> Just wondering if anyone could offer suggestions.
> 
> Many thanks.
> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292644
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to