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

2012-05-10 Thread Les Mizzell
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

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

2012-05-10 Thread andy matthews
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

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

2012-05-10 Thread Bobby
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

cfsqltype for date and time

2009-05-28 Thread Chad Gray
Hello, What cfsqltype in a cfqueryparam should I use to insert now() into a mySql database (datetime data type) so it keeps the date and time? cf_sql_timestamp and cf_sql_date only seem to hold the date, not the time when I insert

Re: cfsqltype for date and time

2009-05-28 Thread C S
What cfsqltype in a cfqueryparam should I use to insert now() into a mySql database (datetime data type) so it keeps the date and time? cf_sql_timestamp. You might double check your syntax and the data type. It works fine for me. INSERT INTO Table (DateTimeColumn) VALUES ( cfqueryparam

Re: cfsqltype for date and time

2009-05-28 Thread Dave Watts
What cfsqltype in a cfqueryparam should I use to insert now() into a mySql database (datetime data type) so it keeps the date and time? cf_sql_timestamp and cf_sql_date only seem to hold the date, not the time when I insert. You should use CF_SQL_TIMESTAMP, but you'll need to make sure

Date and Time Validation

2008-07-11 Thread Kamru Miah
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

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: cfset Hours =

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

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:

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

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

Re: Date and Time

2007-06-27 Thread Terry Schmitt
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

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

Re: Date and Time

2007-06-26 Thread Jerry Johnson
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

Date and Time

2007-06-26 Thread Steven Sprouse
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

Re: portable SQL queries with date and time values

2005-10-27 Thread wolf2k5
On 8/17/05, wolf2k5 [EMAIL PROTECTED] wrote: Hi, I am trying to figure out what is the best way to write SQL queries including date and time values that will work across several Oracle Database installations (different versions and different regional settings). So far I am using some code

RE: portable SQL queries with date and time values

2005-10-27 Thread Kerry
, I can use string functions e.g. mid() to pull the data out and create a date - createdate(left(mydate,4),mid(mydate,5,2) e.t.c. -Original Message- From: wolf2k5 [mailto:[EMAIL PROTECTED] Sent: 27 October 2005 15:56 To: CF-Talk Subject: Re: portable SQL queries with date and time values

Re: portable SQL queries with date and time values

2005-10-27 Thread wolf2k5
On 10/27/05, Kerry [EMAIL PROTECTED] wrote: dont know about best practice, but to ensure date portability I dont use date fields in the DB, I use varchar fields and put ISO dates in them e.g. 20051027T161420 Then if needed, I convert to proper dates once the value is out of the DB. Since I

portable SQL queries with date and time values

2005-08-17 Thread wolf2k5
Hi, I am trying to figure out what is the best way to write SQL queries including date and time values that will work across several Oracle Database installations (different versions and different regional settings). So far I am using some code similar to this: cfset myMask = MM/DD/

Date, Ignore time

2004-08-24 Thread Tangorre, Michael
What is the most efficient way to ignore the time portion of a date field in SQL server when making a comparison to a user specified date value without a time portion? Wow, that was a mouthful. Thanks, Mike [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User

Re: Date, Ignore time

2004-08-24 Thread Casey C Cook
trunc ? Thanks, CC x56927 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: Date, Ignore time

2004-08-24 Thread Barney Boisvert
Cast to date, if you're not using an index, would seem like the best bet to me.Second to that, add a time portion to the user's value behind the scenes that will make the comparison do what you want.If it's a LT comparison, set the time to midnight.If it's a LTE, set the time to 23:59:59.etc. I

Re: Date, Ignore time

2004-08-24 Thread Casey C Cook
Or maybe Left(Getdate(),11) Thanks, CC [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: Date, Ignore time

2004-08-24 Thread Greg Morphis
thats what I was going to suggest select trunc(date_Field) from dual will return just the date part.. but they're using SQL server, I dont think trunc works with that :) perhaps select convert(datetime, convert(varchar(10), DateField, 101), 101)

Re: [cftalk] calculating the date and time.

2003-08-14 Thread Allan Cliff
To: CF-Talk Sent: Wednesday, July 30, 2003 12:24 PM Subject: [cftalk] calculating the date and time. How do I get the calculate the from time to start at 01:00 am and the to time to end at 00:59 am. Can you please show me how to get the date and time in the format mentioned below

Re: [cftalk] calculating the date and time.

2003-08-12 Thread Allan Cliff
] calculating the date and time. Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the from-to date time in the last 24 hours In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) Many Thanks Allan CFIF LookingAt IS Week CFSET Today

Re: [cftalk] calculating the date and time.

2003-08-05 Thread Allan Cliff
-Talk Sent: Wednesday, July 30, 2003 12:53 PM Subject: Re: [cftalk] calculating the date and time. CFIF LookingAt IS Day CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today)) /CFIF - Original Message

Re: [cftalk] calculating the date and time.

2003-08-05 Thread Allan Cliff
= DateAdd(N,1,DateAdd(D,-1,Today)) /CFIF - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 1:00 PM Subject: [cftalk] calculating the date and time. not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the result

calculating the date and time.

2003-07-30 Thread Allan Clarke
Hi All, I was hoping somebody could help me. I'm trying to display the date and time. This is how I want to display it: If the current time is 10:05, I want to display the time in this format: In the last hour (09:05 - 10:04) If the current time is 10:05 and the date is 30.July, I want

RE: calculating the date and time.

2003-07-30 Thread Philip Arnold
I was hoping somebody could help me. I'm trying to display the date and time. This is how I want to display it: If the current time is 10:05, I want to display the time in this format: In the last hour (09:05 - 10:04) If the current time is 10:05 and the date is 30.July, I want

calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
How do I get the calculate the from time to start at 01:00 am and the to time to end at 00:59 am. Can you please show me how to get the date and time in the format mentioned below In the last 7 days (23 Jul 2003 01:00 - 30 Jul 2003 00:59) I was hoping somebody could help me. I'm trying

Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
To: CF-Talk Sent: Wednesday, July 30, 2003 12:24 PM Subject: [cftalk] calculating the date and time. How do I get the calculate the from time to start at 01:00 am and the to time to end at 00:59 am. Can you please show me how to get the date and time in the format mentioned below

[cftalk] calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the from-to date time in the last 24 hours In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) Many Thanks Allan CFIF LookingAt IS Week CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now

Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
] calculating the date and time. Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the from-to date time in the last 24 hours In the last 24 hours (29 Jul 2003 10:00 - 30 Jul 2003 09:59) Many Thanks Allan CFIF LookingAt IS Week CFSET Today

Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
-Talk Sent: Wednesday, July 30, 2003 12:53 PM Subject: Re: [cftalk] calculating the date and time. CFIF LookingAt IS Day CFSET Today = CreateDateTime(Year(Now()),Month(Now()),Day(Now()),9,59,0) CFSET LastWeek = DateAdd(N,1,DateAdd(D,-1,Today)) /CFIF - Original Message

[cftalk] calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
)) /CFIF - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 12:48 PM Subject: [cftalk] calculating the date and time. Spot on Allan, this is what I was trying to do. Can you show me how to calclulate the from-to date time

Re: [cftalk] calculating the date and time.

2003-07-30 Thread Allan Cliff
= DateAdd(N,1,DateAdd(D,-1,Today)) /CFIF - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 1:00 PM Subject: [cftalk] calculating the date and time. not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the result

RE: [cftalk] calculating the date and time.

2003-07-30 Thread Philip Arnold
not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the result to be (29 Jul 2003 11:00 - 30 Jul 2003 10:59) Do you want it from the end of the previous hour? BTW, the reason I pointed you at DateAdd() and no further is that you should be able to work it out for

[cftalk] calculating the date and time.

2003-07-30 Thread ColdFusion Programmer
,-1,Today)) /CFIF - Original Message - From: ColdFusion Programmer To: CF-Talk Sent: Wednesday, July 30, 2003 1:00 PM Subject: [cftalk] calculating the date and time. not quite as I was expecting. Take the current time, its 11:55 am GMT, I want the result

Date and time stamp

2001-06-04 Thread Parker, Kevin
Can anyone assist with this query please. I want to create a text box where subsequent users can add information to existing info but what I want them to be able to do is place the cursor in the text box, hit a button (or a keystroke) and it places a date and time stamp inside the text box

Insertion of date and time of entry into a database field

2001-05-23 Thread Jerre Hale
I would like to capture the current date and time in an Access database file when a client logins and downloads software. I can capture the userid and password with the following code in template1 and this code in template2 cfinsert datasource=ssh tablename=ssh/cfinsert . I tried the create

RE: Insertion of date and time of entry into a database field

2001-05-23 Thread Adkins, Randy
Post your Query Code that does the insert -Original Message- From: Jerre Hale [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 10:14 AM To: CF-Talk Subject: Insertion of date and time of entry into a database field I would like to capture the current date and time in an Access

RE: Insertion of date and time of entry into a database field

2001-05-23 Thread John Wilker
:14 AM To: CF-Talk Subject: Insertion of date and time of entry into a database field I would like to capture the current date and time in an Access database file when a client logins and downloads software. I can capture the userid and password with the following code in template1 and this code

RE: Insertion of date and time of entry into a database field

2001-05-23 Thread Tony Gruen
sfnetworks -Original Message- From: Jerre Hale [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 7:14 AM To: CF-Talk Subject: Insertion of date and time of entry into a database field I would like to capture the current date and time in an Access database file when a client logins

RE: Insertion of date and time of entry into a database field

2001-05-23 Thread Semrau, Steven L Mr SRA
-Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 10:46 AM To: CF-Talk Subject: RE: Insertion of date and time of entry into a database field Post your Query Code that does the insert -Original Message- From: Jerre Hale [mailto

RE: Insertion of date and time of entry into a database field

2001-05-23 Thread Wjreichard
- From: Adkins, Randy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 23, 2001 10:46 AM To: CF-Talk Subject: RE: Insertion of date and time of entry into a database field Post your Query Code that does the insert -Original Message- From: Jerre Hale [mailto:[EMAIL PROTECTED]] Sent

RE: Insertion of date and time of entry into a database field

2001-05-23 Thread Peter Tilbrook
, 2001 12:14 AM To: CF-Talk Subject: Insertion of date and time of entry into a database field I would like to capture the current date and time in an Access database file when a client logins and downloads software. I can capture the userid and password with the following code in template1

Re: Custom Tag for Date and Time

2000-07-31 Thread James Taavon
2008 (Datetime field overflow) [IBM][Client Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0180 - Syntax of date, time, or timestamp value not valid. The error occurred while processing an element with a general identifier of (CFQUERY), occupying document position (9:1) to (9:42). Any ideas?

Insert date and time into database

2000-07-31 Thread Jacob
I want to insert the date and time into a sql database. Here is want I am trying to do: cfset now=createodbcdatetime(now()) cfquery name="resettime" datasource="hits" update hitclear where table_id = 'reeldemand' set cleardate = '#now#' /cfquery But, I get the fol

Re: Insert date and time into database

2000-07-31 Thread John Quarto-vonTivadar
: Monday, July 31, 2000 2:34 PM Subject: Insert date and time into database I want to insert the date and time into a sql database. Here is want I am trying to do: cfset now=createodbcdatetime(now()) cfquery name="resettime" datasource="hits" update hitclear where ta

RE: Insert date and time into database

2000-07-31 Thread Olive, Christopher M Mr NMR
PROTECTED] Subject: Insert date and time into database I want to insert the date and time into a sql database. Here is want I am trying to do: cfset now=createodbcdatetime(now()) cfquery name="resettime" datasource="hits" update hitclear where table_id = 'reeldemand' set cleardat

RE: Insert date and time into database

2000-07-31 Thread Tim Bahlke
your CFSET statement. If you can't, I'm sure someone on this list will speak up. Tim Bahlke, CIFO thinkcreate.com p. 336.230.0575 f. 336.230.0083 -Original Message- From: Jacob [mailto:[EMAIL PROTECTED]] Sent: Monday, July 31, 2000 2:34 PM To: [EMAIL PROTECTED] Subject:

Re: Insert date and time into database

2000-07-31 Thread peter
AM Subject: Insert date and time into database I want to insert the date and time into a sql database. Here is want I am trying to do: cfset now=createodbcdatetime(now()) cfquery name="resettime" datasource="hits" update hitclear where table_id = 'reeldemand' set cleardate =

RE: Insert date and time into database

2000-07-31 Thread Jacob
Removing the quotes did not work. I do not deal with adding dates to a database to much, but when I do, it takes me a while to figure it out. I went with plan B below. It works. Fine for what I need. cfset dateclear = #dateformat(now(), "mm/dd/yy")# cfset timeclear = #timeformat(now(),

RE: Custom Tag for Date and Time

2000-07-31 Thread Chapman, Katrina
ssignedby,comptime) values ('#url.lid#', '#form.summary#','#url.assigned#','',sysdate) /cfquery HTH, --K -Original Message- From: James Taavon [SMTP:[EMAIL PROTECTED]] Sent: Monday, July 31, 2000 11:07 AM To: [EMAIL PROTECTED] Subject: Re: Custom Tag for Date and Time Phil

Re: Custom Tag for Date and Time

2000-07-31 Thread James Taavon
,sysdate) /cfquery HTH, --K -Original Message- From: James Taavon [SMTP:[EMAIL PROTECTED]] Sent: Monday, July 31, 2000 11:07 AM To: [EMAIL PROTECTED] Subject: Re: Custom Tag for Date and Time Philip, I tried this... cfquery name="Insert"

RE: Custom Tag for Date and Time

2000-07-31 Thread Robert Everland III
AS/400 uses Julian date. That could be why there is a way in how you have to add those in there. Ask the RPG programmers what they put in for date and time. I forgot all about that. Bob Everland -Original Message- From: James Taavon [mailto:[EMAIL PROTECTED]] Sent: Monday, July 31, 2000

RE: Custom Tag for Date and Time

2000-07-30 Thread Philip Arnold - ASP
Any one have a custom tag that retrieves both the DateFormat (Now()) and TimeFormat (Now()) as one function that can be inserted into a database? I assume you've got your field as a DateTime format - if not, then change it to be DateTime Also, try to use the database native functions - Now()

RE: Custom Tag for Date and Time

2000-07-28 Thread Olive, Christopher M Mr NMR
why not just insert '#DateFormat(Now())# #TimeFormat(Now())#' ? Chris Olive, DOEHRS Website Administrator -Original Message- From: James Taavon [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 11:22 AM To: [EMAIL PROTECTED] Subject: Custom Tag for Date and Time Any one have

Re: Custom Tag for Date and Time

2000-07-28 Thread Gene Kraybill
rrent date and time using NOW and insert that as a date-time object into a single database field? Something like: MyDateTime=#CreateODBCDateTime(Now())# Gene Kraybill LPW Associates LLC Mansfield, PA -- Archives: http:

Re: Custom Tag for Date and Time

2000-07-28 Thread Shane Pitts
in you sql why not just use CreateODBCDateTime(Now()) - Original Message - From: "James Taavon" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 28, 2000 9:22 AM Subject: Custom Tag for Date and Time Any one have a custom tag that retrieves both the DateF

RE: Custom Tag for Date and Time

2000-07-28 Thread Sharon DiOrio
Message- From: James Taavon [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 11:22 AM To: [EMAIL PROTECTED] Subject: Custom Tag for Date and Time Any one have a custom tag that retrieves both the DateFormat (Now()) and TimeFormat (Now()) as one function that can be inserted into a database

Re: Custom Tag for Date and Time

2000-07-28 Thread James Taavon
PROTECTED]] Sent: Friday, July 28, 2000 11:22 AM To: [EMAIL PROTECTED] Subject: Custom Tag for Date and Time Any one have a custom tag that retrieves both the DateFormat (Now()) and TimeFormat (Now()) as one function that can be inserted into

Re: Custom Tag for Date and Time

2000-07-28 Thread James Taavon
yep, this is what I got when using it, ODBC Error Code = 22008 (Datetime field overflow) [IBM][Client Access ODBC Driver (32-bit)][DB2/400 SQL]SQL0180 - Syntax of date, time, or timestamp value not valid. "Olive, Christopher M Mr NMR" wrote: why not just insert '#Date

RE: Custom Tag for Date and Time

2000-07-28 Thread jamesa {James Alexander}
or #CreateODBCDateTime(now())# -Original Message- From: Olive, Christopher M Mr NMR [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 10:44 AM To: '[EMAIL PROTECTED]' Subject: RE: Custom Tag for Date and Time why not just insert '#DateFormat(Now())# #TimeFormat(Now())#' ? Chris

Re: Custom Tag for Date and Time

2000-07-28 Thread James Taavon
bothr Time and Date. am i making any sense? Robert Everland wrote: Also double check to see if your AS/400 is set to accept the data you are sending in that field. The error you are getting looks as though it's expecting a different kind of data format so either quotes are where