Solved

# ASP Classic - VBScript Math 7 1/8 compare 7 2/8

Posted on 2013-01-10

Hello All;

As the title suggest, I need to compare some numbers.

OK, If VBScript does not work, then JavaScript will be welcomed in this project.

OK.

I need to compare numbers, and show the difference between the 2 sets.

However, they are using the "Date Entered" as well.

So, lets say that the following exist.

NewDate = 1/7/2013

OldDate = 1/2/2013

OldDate 7 2/8

NewDate 7 4/8

Resulting in: **Gained: 2/8**

Between the 2 figures, there is a 2/8 difference.

Now, if it is like this

OldDate 7 2/8

NewDate 7 1/8

Resulting in: **Loss: 1/8**

So basically, I need it to be like so.

If NewDate<OldDate then

Loss 1/8 (Have to show the amount that is lost)

elseif NewDate>OldDate then

Gained 2/8 (Once again, have to show the amount that is gained.

End if

I hope that this all makes some since to someone.

I really need this mathematical calculations to work in my project, to really add that user friendly feeling to this site.

Thank you

**Carrzkiss**