How do you add 2 hours to a timeformat in coldfusion 8

I currently am trying to use a time variable (timeformat) and add two hours to the time in the variable. How would you go about doing such a thing? I'm currently using the code in the snippet as a reference.
<cfsetTimeShown = 8:00 pm>
<cfschedule action="Update" task="#FORM.ShowingID#" operation="httprequest"
    Startdate="#DateFormat(DateShown,"mm/dd/yyyy")#"
    Starttime="#TimeFormat(TimeShown)#"
URL=""
    interval="300" 
    Requesttimeout="600" >

Open in new window

LVL 1
jasch2244Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PluckaCommented:
dateAdd("h", 2, dateVariable)

You might need to convert your TimeShown to a dateObject if it's not already, you can use createDateTime for that.
0
jasch2244Author Commented:
Is there a way to do it with out a date variable? I need to insert a time specifically into cfschedule, that's why I used: TimeFormat(TimeShown). Could you show me the code I"m a complete newb.
0
PluckaCommented:
I would need to know what your TimeShow looks like what format is it paste an example ie

14:50
12:20 am

If you can tell me what it looks like, I'll post the code.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

PluckaCommented:
It might just work like this

Starttime="#TimeFormat(TimeShown)#"

Starttime="#TimeFormat(DateAdd("h", 2, TimeShown))#"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jasch2244Author Commented:
Thank you that works great for the time increase for two hours. Could you give me an example of where you would increment a date value by say 2 days? I would be happy to accest as a multiple solution. Thank you, thank you!
0
PluckaCommented:
Its the same

dateAdd("d", 2, dateVariable)

note the h changed to a d (hours to days)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.