This is just plain stupid.
Client enters: 100,000.00
Formatting is: $#NumberFormat(my_number,___.00)#
Cold Fusion Says: Cannot convert 100,000.00 to number.
I have to be brain dead. There is no way I should have to strip commas, so
what stupid thing am I doing? Just no seeing
...@austin-williams.com]
Sent: Thursday, May 13, 2010 1:28 PM
To: cf-talk
Subject: Convert to number
This is just plain stupid.
Client enters: 100,000.00
Formatting is: $#NumberFormat(my_number,___.00)#
Cold Fusion Says: Cannot convert 100,000.00 to number.
I have to be brain
to number
This is just plain stupid.
Client enters: 100,000.00
Formatting is: $#NumberFormat(my_number,___.00)#
Cold Fusion Says: Cannot convert 100,000.00 to number.
I have to be brain dead. There is no way I should have to strip commas, so
what stupid thing am I doing
, 2010 1:38 PM
To: cf-talk
Subject: Re: Convert to number
That won't work, you'll get 100.00, not 10.00. Try
REReplace(my_number, [^0-9.], , all).
cheers,
barneyb
On Thu, May 13, 2010 at 10:34 AM, DURETTE, STEVEN J (ATTASIAIT)
sd1...@att.com wrote:
Robert,
You shouldn't have to strip
Thanks. Have to say though, that's just plain annoying. I was assuming CF
would not choke on something so commonplace.
Robert B. Harrison
Director of Interactive Services
Austin Williams
125 Kennedy Drive, Suite 100
Hauppauge NY 11788
P : 631.231.6600 Ext. 119
F : 631.434.7022
:
This is just plain stupid.
Client enters: 100,000.00
Formatting is: $#NumberFormat(my_number,___.00)#
Cold Fusion Says: Cannot convert 100,000.00 to number.
I have to be brain dead. There is no way I should have to strip commas, so
what stupid thing am I doing? Just no seeing
I was assuming CF would not choke on something so commonplace.
Programing languages obey syntax rules, not commonplace.
I've worked with tens of different languages in my career, I've never
seen one taking commas in numbers.
it be
REReplace(my_number, [^0-9\.], , all)?
I thought that . meant any single character in RegEx.
Thanks,
Steve
-Original Message-
From: Barney Boisvert [mailto:bboisv...@gmail.com]
Sent: Thursday, May 13, 2010 1:38 PM
To: cf-talk
Subject: Re: Convert to number
That won't work
Michael wrote:
Now, you have asked the right question. ;-) See if this helps:
http://www.cflib.org/udf.cfm?ID=1339
Tried to test your function with Johnny's number but it kicks an invalid date
parsing error.
~|
Message:
Someone must have epxerienced this problem before. The number is the lastlogon
date produced by the Active Directory (Windows 2000) when I used LDAP to query
it. Let me know if you know how to parse it now.
Johnny
The number can be a misinterpreted representation of the Unix Epoch time.
Remember the EPOCH times for Unix and Windows are different.
Try this, read the comments I have included for you:
!---
Problem: LDAP date is returned as NANOSECONDS and if you try to write a
function to parse it CFMX returns an error saying the number is too big to fit
in integer
Now, you have asked the right question. ;-) See if this helps:
http://www.cflib.org/udf.cfm?ID=1339
M!ke
-Original Message-
From: Johnny Le [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 04, 2006 12:35 PM
To: CF-Talk
Subject: Re: How to convert a number into date?
Someone must have
Wow, David, that works. Thank you.
Wonder why they chose 1/1/1601 as the starting point.
Johnny
Remember the EPOCH times for Unix and Windows are different.
Try this, read the comments I have included for you:
!---
Problem: LDAP date is returned as NANOSECONDS and if you try
David Strong wrote:
Remember the EPOCH times for Unix and Windows are different.
just an fyi: there are more than 1 windows epoch depending on what you're
doing.
besides the windows file time (ticks or 100 nanoseconds since 1-jan-1601)
there's now also dotnet datetime (ticks since
Johnny Le wrote:
Wonder why they chose 1/1/1601 as the starting point.
because it's the beginning of the last 400-year cycle by which leap-years are
calculated in the Gregorian calendar, which was followed by a new 400-year
cycle
beginning with 2001.
The number can be a misinterpreted representation of the Unix Epoch time.
(The number of seconds passed since January 1 1970 00:00:00).
But I believe your number is way too big.
Please we need more info on the origins of your number.
Hi,
How do I turn this number 127937470871482500 into date? When I tried
isNumericDate(), it returns yes, but I don't know how to display it in a
readable format.
Thanks.
Johnny
~|
Message:
Did you try dateFormat()?
-Original Message-
From: Johnny Le [mailto:[EMAIL PROTECTED]
Sent: Friday, June 02, 2006 7:00 PM
To: CF-Talk
Subject: How to convert a number into date?
Hi,
How do I turn this number 127937470871482500 into date? When I tried
isNumericDate(), it returns yes
[mailto:[EMAIL PROTECTED]
Sent: Friday, June 02, 2006 7:00 PM
To: CF-Talk
Subject: How to convert a number into date?
Hi,
How do I turn this number 127937470871482500 into date? When I tried
isNumericDate(), it returns yes, but I don't know how to display it in a
readable format.
Thanks.
Johnny
to convert a number into date?
How? I tried dateFormat(number, mm/dd/yy) and it returns 12/02/292269055.
I think it is because it is supposed to return both date and time. Let me
know if you want to format it to display both date and time.
Johnny
Did you try dateFormat()?
-Original
Does something like this exist and I am missing it...basically getting
datepart(ww, orderdate) for some graphing in SQL and would like in the
cfoutput to have that converted to week of or xx/yy - xx/yy.
Thanks!
Eric
~|
Find
Sorry, got it off of CFLIB. Sweet!!
Thanks!
-Original Message-
From: Eric Hoffman [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 20, 2005 11:36 AM
To: CF-Talk
Subject: Library to convert week number to string?
Does something like this exist and I am missing it...basically getting
you can use aif control and if ID is null then its value is equal to 0.but firstly you must define a int variable and you use it for ID's value.
Sam Fisher [EMAIL PROTECTED] wrote:
Hi Everyone,
Can someone tell be why I get a string convert error.I have tried setting up ID to Val(ID) and even
Hi Everyone,
Can someone tell be why I get a string convert error.I have tried setting up ID to Val(ID) and even IncrementValue(Val(ID)), but all it ever returns is either 0 or 1, respectively.Apparently ID is not getting converted.I feel like I'm taking crazy pills!What is wrong with converting a
cannot convert to number
Hi Everyone,
Can someone tell be why I get a string convert error.I have tried setting up ID to Val(ID) and even IncrementValue(Val(ID)), but all it ever returns is either 0 or 1, respectively.Apparently ID is not getting converted.I feel like I'm taking crazy pills!What
PROTECTED]
Sent: Monday, December 01, 2003 12:32 PM
To: CF-Talk
Subject: value cannot convert to number
Hi Everyone,
Can someone tell be why I get a string convert error.I have tried
setting up ID to Val(ID) and even IncrementValue(Val(ID)), but all it ever
returns is either 0 or 1
Original Message:
From: Sam Fisher [EMAIL PROTECTED]
The value cannot be converted to a number
155 : CFOUTPUT#ID#/CFOUTPUT
156 : CFSET ID=ID + 1
What code have you used when using Val() on ID.
Have you tried this:
CFSET ID = VAL(ID) + 1
?
If so and it still throws an error, send
[mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 3:32 PM
To: CF-Talk
Subject: value cannot convert to number
Hi Everyone,
Can someone tell be why I get a string convert error.I have tried
setting up ID to Val(ID) and even IncrementValue(Val(ID)), but all it ever
returns is either 0 or 1
Original Message:
From: Charlie Griefer [EMAIL PROTECTED]
val() won't convert an empty string.
Yeah, it will convert an empty string. It converts it to 0.
Scott
---
Scott Brady
http://www.scottbrady.net/
[Todays Threads]
[This Message]
[Subscription]
[Fast
learn something every day :)
- Original Message -
From: Scott Brady
To: CF-Talk
Sent: Monday, December 01, 2003 1:50 PM
Subject: Re: value cannot convert to number
Original Message:
From: Charlie Griefer [EMAIL PROTECTED]
val() won't convert an empty string.
Yeah, it will convert
Message -
From: Sam Fisher
To: CF-Talk
Sent: Monday, December 01, 2003 12:32 PM
Subject: value cannot convert to number
Hi Everyone,
Can someone tell be why I get a string convert error.I have tried setting up ID to Val(ID) and even IncrementValue(Val(ID)), but all it ever returns is either 0
.
-Sam
- Original Message -
From: Cameron Childress
To: CF-Talk
Sent: Monday, December 01, 2003 3:46 PM
Subject: RE: value cannot convert to number
You've not included what you think the value of ID is, but if it's (an
empty string as the error indicates), then val() will return a zero
Why does this statement generate a Cannot convert to number error?
CFQUERY name=getorderid datasource=printprices
Select max(orderid) as orderID from purchases
/cfquery
CFIF getorderid.recordcount EQ 0
CFSET orderid=1001
CFELSE
CFSET orderid = getorderid.orderid + 1
/CFIF
Thanks
Why does this statement generate a Cannot convert to number error?
CFQUERY name=getorderid datasource=printprices
Select max(orderid) as orderID from purchases
/cfquery
CFIF getorderid.recordcount EQ 0
CFSET orderid=1001
CFELSE
CFSET orderid = getorderid.orderid + 1
/CFIF
Probably a stupid
-- Original Message --
From: Robert Orlini [EMAIL PROTECTED]
Why does this statement generate a Cannot convert to number error?
CFQUERY name=getorderid datasource=printprices
Select max(orderid) as orderID from purchases
/cfquery
CFIF
It worked Scott. Thanks all again...
-Original Message-
From: Scott Brady [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 1:59 PM
To: CF-Talk
Subject: Re: convert to number
-- Original Message --
From: Robert Orlini [EMAIL PROTECTED]
Why
On 1/13/03, Jillian Carroll penned:
I am having a really weird problem... I do some calculations in CF, they
work on my development machine (Windows XP Home/Apache) but when I
upload them to my host (Windows 2000/IIS) they don't work. I get this
error... anybody able to help me on this one?
***
cfquery name=tools datasource=#dsn# username=jubilee
password=cds337
Better change your password now.
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
why? do you know the DSN...?
-Original Message-
From: Everett, Al [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2003 16:28
To: CF-Talk
Subject: RE: Cannot convert to number.
cfquery name=tools datasource=#dsn# username=jubilee
password=cds337
Better change your password now
No, but better safe than sorry.
-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 11:32 AM
To: CF-Talk
Subject: RE: Cannot convert to number.
why? do you know the DSN...?
-Original Message-
From: Everett, Al
: RE: Cannot convert to number.
No, but better safe than sorry.
-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]]
Sent: Monday, January 13, 2003 11:32 AM
To: CF-Talk
Subject: RE: Cannot convert to number.
why? do you know the DSN...?
-Original
I would have though you would need registry access? or object access?
-Original Message-
From: Robert Bailey [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2003 16:45
To: CF-Talk
Subject: RE: Cannot convert to number.
And as long as you can get a script on the server, can get a list
: Monday, January 13, 2003 8:43 AM
To: CF-Talk
Subject: RE: Cannot convert to number.
I would have though you would need registry access? or object access?
-Original Message-
From: Robert Bailey [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2003 16:45
To: CF-Talk
Subject: RE: Cannot
yeah, but both of these functions can be disabled via the CFAS IDE
-Original Message-
From: Robert Bailey [mailto:[EMAIL PROTECTED]]
Sent: 13 January 2003 16:53
To: CF-Talk
Subject: RE: Cannot convert to number.
Yeah, would need to call an object. Not much for navigating the
registry
Information
An error occurred while evaluating the expression:
EndRow = StartRow + OnEachPage - 1
Error near line 39, column 8.
Cannot convert to number.
Please, check the ColdFusion manual for the allowed conversions between
data types
The error occurred while processing an element with a general
://www.digitalshop.co.nz
- Original Message -
From: Jillian Carroll [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, January 12, 2003 10:15 PM
Subject: Cannot convert to number.
I am having a really weird problem... I do some calculations in CF, they
work on my development machine (Windows
#attributes.attcode# +
#GetVacationDetails.RegHrs#
Error near line 106, column 9.
Cannot convert SUM_8000 to number.
Please, check the ColdFusion manual for the allowed conversions between
data types
are there any limitations or exceptions to nesting #var#'s?
Angel Stewart [EMAIL PROTECTED] on 11/19/2001 02:29:31 PM
Please respond to [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
cc:
Subject: Cannot convert to number
OMG.
I feel like its all coming apart now.
Got hit
What are exactly are you trying to do? What result are you expecting?
What's a typical value for attcode?
-Original Message-
From: Angel Stewart [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 15:30
To: CF-Talk
Subject: Cannot convert to number
OMG.
I feel like its all
To: CF-Talk
Subject: Cannot convert to number
OMG.
I feel like its all coming apart now.
Got hit with another error , on another screen.
-
An error occurred while evaluating the expression:
SUM_
50 matches
Mail list logo