Subtract Percentage
I would like to subtract a fixed percentage (15%) but can't seem to get the syntax right.
Output:
Item: Nougat Retail Price: $3.99 Discount Price: 15% Total: ?
Code:
strChocoItem1 = "Nougat"
strRetPrice1 = FormatCurrency("3.99")
strDiscPrice = FormatPercent(".15")
strTotal = ?
I've tried lots of different ways to reach the total but failed every time. I want to subtract the retail price from the discount price using a fixed percentage. Is this possible?
View Replies
ADVERTISEMENT
i need to subtract today's date from another data in the future to tell me how many days left for this data
i tried this
Code:
dim a
a=1/8/2003
dim b
b=date()
dim c
c=a-b
response.write c
but it gives this
29/06/1796 05:15:26
so can any body tell me how can i do it ?images/smilies/confused.gif
View Replies
View Related
need to subtract one date from another to show how long a user was logger in for. i.e.
<%=(rsDriverLogin.Fields.Item("OFF_DATE").Value)%> minus
<%=(rsDriverLogin.Fields.Item("ON_DATE").Value)%>
The values in the sql OFF_DATE and ON_DATE fields are stored as 13/06/2006 19:01:28 . Can either be done on the ASP page or in the db itself, doesn't matter which.
View Replies
View Related
Do u know how to subtract 2 times in this format ?
'03:20 PM' and '03:45 AM' , the result should be 12.25 mins.
View Replies
View Related
I need to be able to subtract the total quantity of a product when someone places an order. I'm trying to get my head around this; what's the strategy for doing something like this?
ASP SQL
So let's say I have a "Thank You" page at the end of the purchase. I have a table with a list of product Ids and a column of quantities left.
If I understand your post, I'm picturing this being a stored procedure that looks at the total quantities from my table that contains all the product quantities. Let's say product 1a has a quantity of 5 and product 2a has a quantity of 6.
A bit fuzzy here but what would a stored procedure look like that is able to update and step through all the items that were purchased?
View Replies
View Related
I am trying to subtract days from a date but I didnt got it. how to do it?
View Replies
View Related
I have a product table in Access, like this:
product_id | product_name | product_quantity
I need to be able to do an SQL update on this table to subtract 1 from the product_quantity field.I could do this with two SQL queries (SELECT product_quantity, then subtract 1, then UPDATE table) but I'm sure there must be a way just to run one query which subtracts 1 from the field. how to do this?
View Replies
View Related
I wrote a survey script but I had problem with the percentage.If 5 persons answers to a question YES and 3 answered NO, how can I get the percentage of each answer (YES & NO)?
View Replies
View Related
this is what im doing
itotalprice = (setfares and other items)
im now dealing with the 5% service charge for credit card payments.
the service charge will be 5% of itotalprice
how can i calculate that.. it will be something like..
surcharge = 5% of itotalprice
fullprice = (itotalprice + surcharge)
View Replies
View Related
I've always been looking for the best way to get an accurate percentage
statistics.
For example, in a election scenario:
Person A gets 33 votes
Person B gets 33 votes
Person C gets 34 votes
Person D gets 35 votes
Total votes = 33 + 33 + 34 + 35 = 135
Percent for A = 0.244.... = 0.24 = 24%
Percent for B = 0.244... = 0.24 = 24%
Percent for C = 0.251... = 0.25 = 25%
Percent for D = 0.259... = 0.26 = 26%
Then add up the percentage values: 24 + 24 + 25 + 26 = 99
(where it should be 100)
So, does anybody have a way to get around this problem? How should I
calculate the percentage for each person so that the percentage will add up
to 100 in the end?
View Replies
View Related
Our store software currently displays the total amount saved (the list price minus our price) for every product using the code below:
'Calculate "YouSave"
If Product_ListPrice > 0 Then
Product_YouSave = Product_ListPrice - Product_LowestPrice
End If
I, however, would like to also diplay the percentage saved next to the amount saved. I tried using the code below but it won't work. Can someone help me out?
'Calculate "YouSavePercent"
If Product_ListPrice > 0 Then
Product_YouSavePercent = ((1 - (Product_LowestPrice / Product_ListPrice) * 100)
End If
View Replies
View Related
I have a recordset iterating through and dumping out to the screen a series
of percentages, using the precision 5 and numericscale 2 etc.
When I dump them to the page some of the number are missing a trailing
zero - ie, 4.7
What I would very much like to do is add this back on - is there an easy way
to format this with a huge load of If...Then's to produce the same affect?
View Replies
View Related
I'm using asp to write an asp page, but I'm having a problem when it comes to closing the written asp script
<%
countFileOpen.write("<% aspCount=5 %>")
%>
how do I escape this character?
View Replies
View Related
I need to build a script where in the source code i enter a number and when the page is executed it shows a percentage.
Here is an example of what i'm trying to do
88.83 / 12 = 740%
and the 740% is the only visable thing on the page
View Replies
View Related
I have to calculate the percentage of an X amount depending on the Quarter of the year. It's driving me crazy, I can't figure out how to do it. Am I missing something. If someone registers the 1st quarter then the price is the full 1200. f the registration occurs the 2nd Quarter, then it is 25% less that rthe full amount. The 3rd is 50% less and the 4th is 75% less.
the amount is 1200
the Quarters of the year = 4
The regristrant is 1
(1200/4)*100 ?????
View Replies
View Related
Well my goal is simple. On my site we show "You save: $**.**" but I want that to say "You save: $**.** (**%)."
The database for our store stores the list price, and our price. The store calculates the you save price... so it should be easy to calculate the saved percentage as well. Here's the code that calculates up the "You save" currently on our website: Code:
View Replies
View Related
i'm sure there're no post about this in asp forum.Any idea how do I show the percentage number for the matching result.
example :
Your search for xxxx :
1. item 1 98%
2. item 2 86%
3. item 3 75%
View Replies
View Related
I want to convert a number to percentage, is there any built-in function for this?
View Replies
View Related