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"  wrote:

>
> ex: 05/31/2012
> 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 >= 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


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:


 

-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


 ex: 05/31/2012  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 >= 


  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 Validation

2008-07-11 Thread Qing Xia
Maybe you can use Regular Expression to validate the input.

On Fri, Jul 11, 2008 at 12:37 PM, Charlie Griefer <[EMAIL PROTECTED]>
wrote:

> On Fri, Jul 11, 2008 at 3:37 AM, Kamru Miah <[EMAIL PROTECTED]> wrote:
> > Please let me know how to validate time input in HH:MM format (i.e. not
> HH:MM:SS). I am using CF8. Thanks a bunch!
>
> you could give 2 dropdowns, one for hours, one for minutes.  but
> really, without more to go on, it's hard to say.
>
> --
> A byte walks into a bar and orders a pint. Bartender asks him "What's
> wrong?" Byte says "Parity error." Bartender nods and says "Yeah, I
> thought you looked a bit off."
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

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


Re: Date and Time Validation

2008-07-11 Thread Gerald Guido
I imagine you would be able to use a mask using cf input to control what the
user enters but to actually validate it as a valid time you would most
probably have to write custom js or find a library that does time
validation.

I use a jQuery plugin called ClockPick when working with times:
http://www.oakcitygraphics.com/jquery/clockpick/trunk/ClockPick.cfm

HTH,
~G~

On Fri, Jul 11, 2008 at 6:37 AM, Kamru Miah <[EMAIL PROTECTED]> wrote:

> Please let me know how to validate time input in HH:MM format (i.e. not
> HH:MM:SS). I am using CF8. Thanks a bunch!
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

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


Re: Date and Time Validation

2008-07-11 Thread Charlie Griefer
On Fri, Jul 11, 2008 at 3:37 AM, Kamru Miah <[EMAIL PROTECTED]> wrote:
> Please let me know how to validate time input in HH:MM format (i.e. not 
> HH:MM:SS). I am using CF8. Thanks a bunch!

you could give 2 dropdowns, one for hours, one for minutes.  but
really, without more to go on, it's hard to say.

-- 
A byte walks into a bar and orders a pint. Bartender asks him "What's
wrong?" Byte says "Parity error." Bartender nods and says "Yeah, I
thought you looked a bit off."

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

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


Re: Date and Time Validation

2008-07-11 Thread Matt Gutting
Kamru,

Do you mean you have someone inputting a time (in a form field or something) 
and you want to make sure it's a valid 12-hour (or 24-hour) time value?

In that case, I'd say just treat it as a colon-separated list, and do something 
like the following:



 
   

   
 
   

   

   


Not the neatest way, by far; but it'll do the trick.

Matt

> Please let me know how to validate time input in HH:MM format (i.e. 
> not HH:MM:SS). I am using CF8. Thanks a bunch! 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

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


Re: Date and Time

2007-06-27 Thread James Holmes
It's SYSDATE in Oracle (if that helps round out the list).

On 6/27/07, Charlie Griefer <[EMAIL PROTECTED]> wrote:
> create a field that has a default value of the current date/time.
> that value depends on your database.  in SQL Server, it's getDate().
> in Access, it's now().  not sure about other databases.

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
ColdFusion 8 beta – Build next generation applications today.
Free beta download on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

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


Re: Date and Time

2007-06-27 Thread Terry Schmitt
Well... The easiest method would be to create a datetime column in your table 
with a default value of getdate(). 

You may want to provide more detail. I would assume that if you know how to 
store the press release in the database, then you would know how to store a 
date. I'm probably missing something though...

Terry

> Does anyone know how I can insert a date and time stamp into a SQL 
> database when someone goes on our website and uploads something?  
> 
> I created a form where someone can input the title and body of a press 
> release but I also want it to automatically record the time that it is 
> uploaded, store it in the database and also output it on the list of 
> press releases.
> 
> How do I do 
this???

~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

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


Re: Date and Time

2007-06-27 Thread Charlie Griefer
create a field that has a default value of the current date/time.
that value depends on your database.  in SQL Server, it's getDate().
in Access, it's now().  not sure about other databases.

On 6/26/07, Steven Sprouse <[EMAIL PROTECTED]> wrote:
> Does anyone know how I can insert a date and time stamp into a SQL database 
> when someone goes on our website and uploads something?
>
> I created a form where someone can input the title and body of a press 
> release but I also want it to automatically record the time that it is 
> uploaded, store it in the database and also output it on the list of press 
> releases.
>
> How do I do this???
>
> 

~|
ColdFusion 8 beta – Build next generation applications today.
Free beta download on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

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


Re: Date and Time

2007-06-26 Thread Jerry Johnson
The easiest way is to set up a default value for that field in your
database, so it gets automatically inserted when you create a new
record.

SQL Server? MySQL? Something else?
If sql server, you would put getDate() as the default value for that
field. This will automatically insert the current datetime into that
field whenever a new record is created.

If you want to insert it yourself, you can set it into the db when you
save the other fields.

Something like

insert into db
(title, body, uploadDate)
VALUES
('#title#','#body#',#createODBCDateTime(now())#)


(of course ,you should use cfqueryparam for the title and body fields,
but I am too lazy to type them).

Jerry

On 6/26/07, Steven Sprouse <[EMAIL PROTECTED]> wrote:
> Does anyone know how I can insert a date and time stamp into a SQL database 
> when someone goes on our website and uploads something?
>
> I created a form where someone can input the title and body of a press 
> release but I also want it to automatically record the time that it is 
> uploaded, store it in the database and also output it on the list of press 
> releases.
>
> How do I do this???
>
> 

~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

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


RE: Date and Time Stamp Discrepancy

2000-03-25 Thread Dave Watts

> We are running the AbleCommerce application under Website and CF 4.5.
> The problem is the discrepancy between the date shown by the
> CF app and the email date stamp.
>
> This is the date sent on the email to the customer:
> "Sunday, March 19, 2000 7:18 PM".
>
> This is the date on the invoice contained in the email:
> "INVOICE 20-Mar-00 10:18 AM  Order Number: 134 Terms: Visa".
>
> Theoretically, both date/time stamps should be pretty close
> to the same, although it appears that the email was sent
> before the sale happened. Is it a CF issue or an NT server
> issue? Anyone have any idea about what is causing this and
> how to fix it?

If your SMTP server is on a different machine, as is often the case, make
sure that it has the same system time as the CF server's machine.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.