val(form.var1) * 1 ?

- Calvin
  ----- Original Message -----
  From: Tony Weeg
  To: CF-Talk
  Sent: Friday, September 26, 2003 8:40 AM
  Subject: RE: convert string of numbers to numeric?


  can you send the whole bit of code? its got to work, there is a way!!!

  :) tony

  -----Original Message-----
  From: Sam Fisher [mailto:[EMAIL PROTECTED]
  Sent: Thursday, September 25, 2003 5:21 PM
  To: CF-Talk
  Subject: Re: convert string of numbers to numeric?

  Thanks, Tony.  Unfortunately it did not work.  The error I continue to get
  is:

  The value """" cannot be converted to a number.

  I have also tried:

  <cfset var1= Val(form.var1 * 1)>

  with no success.  Any thoughts?

  --S



  ----- Original Message -----
  From: "Tony Weeg" <[EMAIL PROTECTED]>
  To: "CF-Talk" <[EMAIL PROTECTED]>
  Sent: Thursday, September 25, 2003 3:33 PM
  Subject: RE: convert string of numbers to numeric?


  > simply stripping out the .'s maybe?
  > or is there something Im not getting?
  >
  > ! tony
  >
  > <cfset newNumber = replace(form.var1,'.',all)>
  >
  > would do I presume?
  >
  > -----Original Message-----
  > From: Sam Fisher [mailto:[EMAIL PROTECTED]
  > Sent: Thursday, September 25, 2003 3:30 PM
  > To: CF-Talk
  > Subject: convert string of numbers to numeric?
  >
  > Hi Everyone,
  >
  > I have a problem.  I am trying to convert a string of numbers to a
  > real
  data
  > type, unfortunately without success.  I read a CF-Talk board
  > discussion about it, but was unable to get it to work.  Can anyone
  > help me.  I
  created
  > an input field:
  >
  > <cfinput type="text" name="var1" validate="float" value="#query.var1#"
  > range="0.00,7.00" required="No" size="4" maxlength="4">
  >
  > Now I need to convert var1 t! o a number before sending it through the
  INSERT
  >! ; (SQL) query on my action page.  What am I missing?
  >
  > Thanks
  >
  > --S
  >
  >
  >
  ________________________________



[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to