472,341 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,341 software developers and data experts.

Swimming Script

My daughter has been swimming year round in Mt. Pleasant, SC and she swims at meets with different pool lengths - 100 meters (Long Course Meters or LCM), 50 yards (Short Course Yards or SCY) and 50 meters (Short Course Meters or SCM).

I'd like to create an ASP page that has input forms to convert times for each pool length to determine how she does each swim. For example, if she swims 1 lap of freestyle in a 25-yard pool and does it in 0:30.00 seconds, that time converts to 0:30.00 x 1.11 + 0.8 seconds for a time of 0:34.10 in a LCM pool.

There are 4 different types of strokes in swimming and slightly different times, below are the conversions I need to do:

50 YARDS SHORT COURSE to LONG COURSE METERS
Butterfly SCY time x 1.11 + .7 seconds
Backstroke SCY time x 1.11 + .6 seconds
Breaststroke SCY time x 1.11 + .7 seconds
Freestyle SCY time x 1.11 + .8 seconds

100, 200 and 400 YARDS SHORT COURS to LONG COURSE METERS
--The same for each stroke but the seconds time doubles each time.

The opposite for LONG COURSE METERS to SHORT COURSE YARDS -
--Instead of adding the seconds, they must be subtacted.

So the script needs:

--A drop down box that has each of the 4 strokes to choose from
--A drop down box that has each of the 3 types of courses to choose from that was the actual pool length swum
--A same drop down choice for the course to convert to
--Multiplied by a hidden number of 1.11
--Addition of a hidden .# seconds determined by the type of stroke

As an example, my daughter swam recently the 100 meter freestyle in 1:17.50 (1 minute, 17 seconds and 50/100's). So to input in a webpage for a calculation:

Event [ ] Course [ ] to [ ] Actual Time [ ] = Converted Time

Event [Free] Course [SCY] to [LCM] Actual Time [1:17.50] = 1:27.60 LCM

I understand ASP scripting and use Dreamweaver MX. However, I've never done a simple ASP calculation script.

My problem is the numeric conversions as in the following:
1:58:98

The 1 is minutes, the 58 is seconds, but the 98 is hundredths.

I don't know how to format such a number especially when the seconds would carry over into the minutes. For instance, a freestyle time of 1:58.98 in a SHORT COURSE YARD pool would increase in conversion to a LONG COURSE METER POOL. I am lost as to how the conversion would take place of the 98 changing over into the seconds column and the seconds colum changing over into the minutes column for a conversion result of:

1:58.98 x 1.11 + 1.6 seconds = 02:13.67

By the way, the 00:00.0 is a swimming numeric format.

Thank you for any assistance.

Dan
Aug 1 '07 #1
1 1590
jhardman
3,406 Expert 2GB
I think I'd convert it all to a number of seconds as far as storage goes, then display it however you want.

Jared
Aug 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Sticks | last post by:
ok... im not quite sure how to describe my problem. i have a php script that runs through my entire php site and writes the resulting output to...
6
by: Mike Daniel | last post by:
I am attempting to use document.write(pageVar) that displays a new html page within a pop-up window and the popup is failing. Also note that...
3
by: Water Cooler v2 | last post by:
Questions: 1. Can there be more than a single script block in a given HEAD tag? 2. Can there be more than a single script block in a given BODY...
2
by: bilaribilari | last post by:
Hi all, I am using Tidy (C) for parsing html pages. I encountered a page that has some script as follows: <script> .... var abc =...
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something...
3
by: rsteph | last post by:
I have a script that shows the time and date. It's been working on my site for quite a while now. Suddenly it stops showing up, after getting my drop...
3
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the...
7
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. ...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.