Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Totalling time
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00898230
Message ID:
00898236
Vues:
10
>I have a character field that contains spans of time: 4hours, 22 minutes, 11 seconds would appear as 04:22:11. My report lists all the time spans now, how do I get a total? Thanks a lot,
>
If you're using a query as a source of report, add one more column with time converted to seconds. After that you can sum seconds in the report varable and convert it back into hh:mm:ss format.
SELECT ..., timefield, 
   CTOT(timefield) - DTOT(TTOD(CTOT(timefield)))) AS timeseconds ;
....
* Convert back to the hh:mm:ss format in the report
PADL(INT(rnTotalSec/3600), 2, "0") + ":" + ;
		PADL(INT((rnTotalSec%3600)/60),2, "0") + ":" + ;
		PADL(rnTotalSec % 60,2, "0") 
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform