RE: date and time from two different inputs query a single datetime field

2012-05-10 Thread andy matthews

Give the fields the same name.

In most languages that results in a commadelimited value which you could
then strip out.

You could also just concatenate them together in your queryparam:

cfqueryparam value=#trim(form.xdate_use)##trim(form.xtime)#
cfsqltype=CF_SQL_DATE /
 

-Original Message-
From: Les Mizzell [mailto:lesm...@bellsouth.net] 
Sent: Thursday, May 10, 2012 8:50 PM
To: cf-talk
Subject: date and time from two different inputs query a single datetime
field


cfinput type=text name=xdate_use  ex: 05/31/2012 cfinput type=text
name=xtime  ex: 3:31 PM

Given the values used as examples for the fields above, exactly how would I
go about querying a datetime stamp field (SQL Server) to find all records
dates on or after the date/time above?

No problem doing it with just the date:

   responsedate = cfqueryparam value=#trim(form.xdate)# 
cfsqltype=CF_SQL_DATE /


  but for the life of me, I can't figure how to put both fields together to
do date AND time...

I'm probably an idiot..



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351113
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: date and time from two different inputs query a single datetime field

2012-05-10 Thread Bobby

#createOBDCDateTime(form.xdate_use  ' '  form.xtime)#


On 5/10/12 9:50 PM, Les Mizzell lesm...@bellsouth.net wrote:


cfinput type=text name=xdate_use  ex: 05/31/2012
cfinput type=text name=xtime  ex: 3:31 PM

Given the values used as examples for the fields above, exactly how
would I go about querying a datetime stamp field (SQL Server) to find
all records dates on or after the date/time above?

No problem doing it with just the date:

   responsedate = cfqueryparam value=#trim(form.xdate)#
cfsqltype=CF_SQL_DATE /


  but for the life of me, I can't figure how to put both fields together
to do date AND time...

I'm probably an idiot..



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351114
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm