Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Timecalc.prg
Message
 
À
23/01/2002 16:28:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00609326
Message ID:
00609537
Vues:
13
Hi Chris

Could you mail me the TimeCalc.prg @
venussoftop@mail.ru

I tried clicking the link below and I got a KBError. I have a DOS app which calcs time but it has its own problem.

>Hi,
>
>I need to do some calculations based on time. For example, someone clocks in at 06:00:00 and clocks out at 16:35:00 I need to find out how many hours and minutes they worked that day. I searched on the Microsoft Knowledge Base and found a prg called timecalc. (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q115055)
>
>I tried it out, and I am not sure if its just me - but it seems to be doing wierd things. I looked at the code behind and it makes sense to me so I don't know whats going one.
>
>MESSAGEBOX(timecalc("21:51:00", "21:00:00:", 2))
>returned 0 hours and 9 minutes.
>
>if I tried it the other way
>MESSAGEBOX(timecalc("21:00:00", "21:51:00:", 2))
>returned 0 hours 51 minutes. (correct)
>
>But if I tried
>MESSAGEBOX(timecalc("06:00:00","16:35:00" , 2))
>returns 10 hours and 35 minutes - this is wrong, it should be 10 hour and 25 minutes
>
>the other way
>MESSAGEBOX(timecalc("16:35:00","06:00:00" , 2))
>returns - 10 hours and 25 minutes
>
>So after looking at timecalc.prg the code made sense and I am not sure why I am getting these results. I have been spending lots of time on this project I am working on lately so maybe I am just missing something very simple.
>
>Anyways, is there a better, more reliable way to do what I want to do? Using vfp 7
>
>Thanks!
>Chris
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform