Hello,

Well, I'll be as brief as I can about this problem I'm having.

I have this form where I need the user to enter in a date for a press 
release (for example). Now, this can't be an automatic date because the 
press release may be dated for another day or even the following month.

So, the problem is, for some reason, What I had begun to do was to take 3 
seperate drop down boxes with Month/Day/Year, and then insert those plus the 
time (ODBC Time) into the database.

Now, the field happens to be a date/time field. It doesn't work and in fact, 
it gives me screwed up results. Why did I do this? because I want to order 
the reports by their dates and if I do it by a text field, well, it will 
just go in alphabetical order and that's useless.

So, one thought I had was for the user to pick what they want from the text 
boxes and then on my processing page, find a way to somehow match that info 
to an ODBC date and then insert it. No idea how to go about doing that.

It is possible that I've screwed up the concatination but I'll let this list 
be the judge of that code (which is included below). The drop down fields 
are just typical drop down fields on a form so I won't post that.

Any help is appreciated and I really hope this made sense.

---------My Code Below---------

<CFSET EDate = EMonth + EDay + EYear + #CreateODBCTime(Now())#>

<CFQUERY DATASOURCE="STA">
INSERT INTO Events(EDate, ETimeStart, ETimeEnd, ETitle, EDetails, Link, 
MyTest)
VALUES(#EDate#, '#ETimeStart#', '#ETimeEnd#', '#ETitle#', '#EDetails#', 
'#Link#', '#MyTest#')
</cfquery>

<cflocation url = "events_post.cfm">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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