>>CF casts datatypes when necessary in an expression. I don't see how
this is
any different from any other casting in CF.
This is what I meant.
http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
~~~
> This only shows that an ODBC dateTime stamp by default, not that Now() returns it.
CFOUTPUT doesn't format anything. It outputs values of expressions.
> If it was so, then Now() + 1 would cause an error, since one
> cannot add a number to a string.
> Try #Now()+1#
> and you'll get a number,
>>It's often easier to use CFQUERYPARAM, actually - for example, you don't
have to worry about single quotes.
But if you want only a date, with no time, you still need to use
CreateODBCDate () to format the date properly for CFQUERYPARAM,
then it is is not that much easier.
--
>>You can easily test this:
>>#Now()#
This only shows that #Now()+1#
and you'll get a number, not an ODBC date. This is because Now() is
known as a date object, thus may be formated as a date,
but Now()+1 is just a number, and formated as such by CFOUTPUT.
--
_
> Thanks all for the quick responses, I've changed the field
> name from Date to AccessDate, makes more sense too. I used
> cfqueryparam on my insert and just trying to get this thing
> to work in the raw first ;). As for using jdbc instead of
> odbc, I have yet to get cf to register the ds usi
> Are you sure of that?
> Now () is supposed to return a date-time object which is a
> foating point value, not an ODBC date.
You can easily test this:
#Now()#
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instructio
>>First, the Now function returns an ODBC timestamp
Are you sure of that?
Now () is supposed to return a date-time object which is a foating point
value, not an ODBC date.
But it is possible that it will be automatically converted to an
ODBCDate by the CFQUERY tag.
And if it does so, then it is
Thanks all for the quick responses, I've changed the field name from Date to
AccessDate, makes more sense too. I used cfqueryparam on my insert and just
trying to get this thing to work in the raw first ;). As for using jdbc instead
of odbc, I have yet to get cf to register the ds using the SQL
:48 PM
To: CF-Talk
Subject: RE: need help with updating date field
Wow... that was just one messed up query I guess heh. I stopped with the
first error I saw... so to recap class...
UPDATE AdminPersonnel
SET First_Name = '#form.First_Name#',
>
> ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
>
> -Original Message-
> From: Charlie Griefer [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 30, 2007 12:28 PM
> To: CF-Talk
> Subject: Re: n
--
DON'T FORGET TO CHANGE ALL THOSE TO CFQUERYPARAMS!
---
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 30, 2007 12:
first off, DATE is a reserved word and probably shouldn't be used as a
column name. if you can't change it, at least enclose it in brackets
([DATE])
in your SQL, remove the single quotes from the #createODBCDate(now())# value.
also, look into using (hey if i didn't say it, somebody
else would h
oooh. good catch :)
On 5/30/07, Marius Milosav <[EMAIL PROTECTED]> wrote:
> You are missing a comma after '#form.Fax#'
>
> Marius Milosav
> ScorpioSoft Corp.
> www.scorpiosoft.com
>
> -Original Message-
> From: Imperial, Robert [mailto:[EMAIL PROTECTED]
> Sent: May 30, 2007 12:21 PM
> To:
> I know this is probably obvious to most of you here, but I
> have an error on an update statement that I need some
> enlightenment on please. I'm using MSSQL2k, CFMX7 and I have
> an insert statement that works fine using
> "#createODBCdate(Now())#" but my update bombs on it??
First, the Now
I think it should be:
Date = #createODBCdate(Now())#,
HTH
Will
-Original Message-
From: Imperial, Robert [mailto:[EMAIL PROTECTED]
Sent: 30 May 2007 17:21
To: CF-Talk
Subject: need help with updating date field
I know this is probably obvious to most of you here, but I have an error o
You are missing a comma after Fax = '#form.Fax#'
Should read Fax = '#form.Fax#',
-Original Message-
From: Imperial, Robert [mailto:[EMAIL PROTECTED]
Sent: 30 May 2007 17:21
To: CF-Talk
Subject: need help with updating date field
I know this is probably obvious to most of you here, but
You are missing a comma after '#form.Fax#'
Marius Milosav
ScorpioSoft Corp.
www.scorpiosoft.com
-Original Message-
From: Imperial, Robert [mailto:[EMAIL PROTECTED]
Sent: May 30, 2007 12:21 PM
To: CF-Talk
Subject: need help with updating date field
I know this is probably obvious to mos
>>Date = '#createODBCdate(Now())#'
Tow things here: first a date value needs no quotes in SQL, then use
this instead:
Date = #createODBCdate(Now())#
Secondly, "Date" is a reserved word in several db systems, it would be a
good idea to use another field name.
--
_
The word "Date" is a reserved word. It is good practice to avoid naming
fields with a reserved word. In this case, wrap it in hard brackets such as
[date] = '#createODBCDate(now())#'
HTH
Steve
-Original Message-
From: Imperial, Robert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May
Remove the single quotes around #createODBCDate(Now())#
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Imperial, Robert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 30, 2007 12:21 PM
To: CF-Talk
Subject: need help with updating da
20 matches
Mail list logo