I'm creating a program to calculate total hours worked, while taking out lunches, for my boss...seen here...
http://answers.yahoo.com/question/index?qid=20070318175500AA6pqfq&r=w
I pretty much have an idea of what to do now, but what code would I enter to set a certain value to a string? Also, where would I put that code in the overall code? I want to make the data like this...
1AM = 1
2AM = 2
3AM = 3
4AM = 4
5AM = 5
6AM = 6
7AM = 7
8AM = 8
9AM = 9
10AM = 10
11AM = 11
12PM = 12
1PM = 13
2PM = 14
3PM = 15
4PM = 16
5PM = 17
6PM = 18
7PM = 19
8PM = 20
9PM = 21
10PM = 22
11PM = 23
12AM = 24
That way, if someone entered 7AM - 4PM, it would take 4PM's 16, and take away 7AM's 7 from it, to equal 9. After that I would take an hour out for a lunch hour and I know it's something like IF mondaytotal > 9 -1 or something like that. If someone could help me out on the part with defining numbers with the AMs and PMs, and/or help me out with lunch part, it would be greatly appreciated!
2007-03-18
15:27:36
·
2 answers
·
asked by
alphaaxl
1
in
Computers & Internet
➔ Programming & Design