> Why add a date if you want to store an interval? I mean, if you want to
> calculate a new date it is the obvious route, but the request was to
> store it.
Lisa: Can you confirm on your question?
> is, how to store the selected values into one field of my database?
Am not sure what your purpose is behind all this.
***Logically.. you would just give a drop down of dates(MM-DD-YYYY) HH:MM***
If i understand the question correctly.. User comes in and selects
something to happen(e.g Email me cheap flights after this period)
2 weeks
3 days
5 hours
10 minutes...
Yes the question is how do you store weeks & days & hours and minutes...
My understanding is a future dateTime has to be created and the database
field would be a DateTime field.. in that case...?
<cfscript>
//create a default current date with form data...
myDate=CreateDateTime(year(now()),month(now),day(now()),form.hrs,form.mins,s
econd(now));
//adding weeks here
myDate=DateAdd("ww",form.ww,myDate());
//adding days here
myDate=DateAdd("d",form.dd,myDate());
</cfscript>
myDate would be the future date created from the form.. to be inserted
into the database in one DateTime FIELD.
Joe
> -----Original Message-----
> From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 6:58 PM
> To: CF-Talk
> Subject: Re: CreateDateTime function??
>
>
> Joe Eugene wrote:
> > All you need is create a default date and use function
> DateAdd("",defaultDate)
> > and create whatever..date you want. Check previous post for code.
>
> Why add a date if you want to store an interval? I mean, if you want to
> calculate a new date it is the obvious route, but the request was to
> store it. Isn't creating a new date and converting that new date back to
> an interval when you need to extract the interval just a whole lot of
> extra hassle?
>
> Jochem
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.