Function to add a decimal place.

I use the function below to format a date in an ASP page.  Is there something I could use to add a decimal to a number from our database?

Database #:
1179

Should be:
1.179

Date Function:

<%
function formatDate(unformattedDate)
myYear = Left(unformattedDate, 1)
myMonth = Mid(unformattedDate, 2, 2)
myDay = Right(unformattedDate, 2)
formatDate = myMonth & "/" & myDay & "/" & myYear + 2000
end function
%>
LVL 1
bschwartingAsked:
Who is Participating?
 
rettiseertConnect With a Mentor Commented:
??? can you just do a division? : number / 1000 ?
0
 
bschwartingAuthor Commented:
ha-ha, you get so technical sometimes, you don't think of the easy options!  that might work!

this might be an ASP question, but how would I divide a value in a response.write?

<% Response.Write Request.Querystring("val1") %>

or

<%Response.Write(MBRSEP)%>">
0
 
bschwartingAuthor Commented:
i did:

<%MBRSEP = Request.Querystring("val1")%>

<%Response.Write(MBRSEP/1000)%>

and it works great.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.