[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Function to add a decimal place.

Posted on 2006-07-12
3
Medium Priority
?
147 Views
Last Modified: 2010-04-30
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
%>
0
Comment
Question by:bschwarting
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
rettiseert earned 2000 total points
ID: 17092691
??? can you just do a division? : number / 1000 ?
0
 
LVL 1

Author Comment

by:bschwarting
ID: 17092942
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
 
LVL 1

Author Comment

by:bschwarting
ID: 17093964
i did:

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

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

and it works great.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question