473,386 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can I Format numbers with VBScript as in MS Access?

63
Is there a way to format numeric data in vbscript? In access, I could write:
format(dbTestVariable,"0.00%"). This does not work when I embed it on the ASP page.
Nov 12 '08 #1
4 3215
jhardman
3,406 Expert 2GB
try formatnumber(), let me know if it helps.

Jared
Nov 13 '08 #2
rmurgia
63
try formatnumber(), let me know if it helps.

Jared
Jared,
It worked! Thanks for the help. Related to this issue, I was able to type:

<%=FormatNumber(dbMthBudFTF,2)% to get the 2 digit decimal place. Is there a way to format as a percentage, like in MS Access: Format(dbMthBudFTF,"0.00%").

Thanks again,
Ralph
Nov 18 '08 #3
jhardman
3,406 Expert 2GB
Sorry if my original answer didn't completely answer you. try:
Expand|Select|Wrap|Line Numbers
  1. <%=FormatPercent(dbMthBudFTF,2) %>
Function Description
FormatCurrency Returns an expression formatted as a currency value
FormatDateTime Returns an expression formatted as a date or time
FormatNumber Returns an expression formatted as a number
FormatPercent Returns an expression formatted as a percentage
w3School's explanation . W3schools is a very good resource, worth playing around on and hanging out. Anyway, let me know if it helps.

Jared
Nov 18 '08 #4
rmurgia
63
Jared,

It worked great. Thanks much!
Nov 19 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Patrick J. Schouten | last post by:
I am new to ASP/VBScript and I am trying to format a texbox when a user exits it. In Visual Basic you could put the following in the Exit property of the textbox: textbox1 = Format(textbox1,...
1
by: Mike MacSween | last post by:
This looks like a bug to me. I have an expression on a report: =Format(Sum((**)*(/)),"0.00") Score is byte PercentOfGrade is double PropDegree is single ModuleCats is byte
5
by: Ataru Morooka | last post by:
Hi, my table has to have a column with the months names (january, february...). When I order it by month it is ordered alphabetically and that's not what I need. Reading this ng I found someone...
6
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but...
6
by: Stuart McGraw | last post by:
I am looking for a VBA "format" or "template" function, that is, a function that takes a format string and a varying number of arguments, and substitutes the argument values into the format string...
5
by: bcanavan | last post by:
When I export xml(and xls) from Access 2003 the result is a complete report in a single page. I would like to get the entire report in a single page (one trip to the server) for printing and...
5
by: Fabian | last post by:
I am making a winforms-program in Visual Studio, that connects to an Access database. In the database all dates are presented in this format : dd-mm-yyyy. In my application I have a DatetimePicker,...
22
by: Frinton | last post by:
Hi, I am trying to do some calculations on large numbers (ie 7,768,489,957,892,578,474,792,094 / 12,280) and no matter what I do it doesn't get it quite right. Its always somewhere between 10...
6
dima69
by: dima69 | last post by:
Biff format is defined as default format for copying data from Access to Excel (under registry key ...\Access\Clipboard Formats). This format has a known problem as numbers are pasted as text using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.