Negative In ASP
This is probably a simple one for you. How do I write the following
I want to say
if AcceptCancel=Accept and VStatus is not equal to X Then
If ((AcceptCancel = "Accept") AND (VStatus != "X")) Then
The mistake is probably the "!". Where do I put it?
View Replies
I was going to use the DateDiff function for something, so I looked up the syntax real quick at w3schools. Here's what they have:
document.write(Date & "<br />")
document.write(DateDiff("m",Date,"12/31/2002") & "<br />")
document.write(DateDiff("d",Date,"12/31/2002") & "<br />")
document.write(DateDiff("n",Date,"12/31/2002"))
Output:1/14/2002
11
351
505440
I put the same code into a simple test document to verify, except for mine has Response.Write. All my numbers came out negative. If I reverse their positions, I get positive numbers. Is the example above wrong or is there something going on with my PC?
View Replies
View Related
I am trying to turn negative numbers to dispaly the value of 0. I have a field called new_past_due I am looking for something like this >
**********************
<%IF new_past_due = >0 then new_past_due = "0"%>
Is there anybody out there that knows the anser to this one?
View Replies
View Related
IN an ASP page I am using the following number formatting for currency, Code:
<%=FormatCurrency(RS("increvhigh"), 2, -1, -1)%>
When I put in my data as a negative number, it is saved to the Access database with parenthesis around the negative number. When I go to the ASP page to display records as line items, the record with the negative value will not display.
View Replies
View Related
formatcurrency function puts ( ) for negative numbers(e.g. (111) ). How can I display the negative numbers with a minus sign infront like -111.
View Replies
View Related
I have two URLs. Static.htm and dynamic.asp
Static.htm
Contains a form with two text boxes, called text_1 and text_2 and some other info that is irrelevant for my question.
Dynamic.asp
Need some code to check that the text boxes only contain values greater than 0 and only numbers. Thus if any of the textboxes for example contain -3 or the letter m I want to cancel the form submission and display some kind of error message.
How can I achieve that?
View Replies
View Related