ASP/Access truncate function?

Results 1 to 3 of 3

Thread: ASP/Access truncate function?

  1. #1
    sjs Guest

    Default ASP/Access truncate function?

    I am trying to truncate two different types of data (percents and money), percents to 4 decimal places and money to 2. I am creating a SQL Update statement, and calling formatnumber with the appropriate decimal specification for each field. However, when I look at the data in Access, the data was not truncated. Any suggestions on how to get this to work??? I need to actually truncate, and not round...for example...I want $15.877 to be saved to Access as $15.87. <BR><BR>Here&#039s part of my SQL....<BR> strSQL = strSQL & " New_Hourly_Rate = " & FormatNumber(newrate,2) & ", "<BR><BR>(the rest of the sql statement is set up the same as this one line...<BR><BR>PLEASE HELP!!!! THANKS!

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP/Access truncate function?

    TRUNCATE(numeric_exp, integer_exp) <BR>(ODBC 2.0)<BR><BR>Returns numeric_exp truncated to integer_exp places right of the decimal point. If integer_exp is negative, numeric_exp is truncated to &#124integer_exp&#124 places to the left of the decimal point.

  3. #3
    sjs Guest

    Default RE: ASP/Access truncate function?

    Thanks for the reply...<BR><BR>I tried that and an getting "Variable is undefined: &#039TRUNCATE&#039"<BR>Do I need to declare something first to be able to use this?<BR><BR>Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts