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
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
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
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
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
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
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
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 =
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
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:
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
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
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
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
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
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
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
, 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
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
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/
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
trunc ?
Thanks,
CC
x56927
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
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
Or maybe Left(Getdate(),11)
Thanks,
CC
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
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)
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
] 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
-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
= 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
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
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
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
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
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
] 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
-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
))
/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
= 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
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
,-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
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
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
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
: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
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
-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
-
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
, 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
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?
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
: 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
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
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:
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 =
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(),
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
,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"
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
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()
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
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:
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
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
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
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
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
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
67 matches
Mail list logo