bschwarting
asked on
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
%>
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
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i did:
<%MBRSEP = Request.Querystring("val1" )%>
<%Response.Write(MBRSEP/10 00)%>
and it works great.
<%MBRSEP = Request.Querystring("val1"
<%Response.Write(MBRSEP/10
and it works great.
ASKER
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)%>