Cacul de l'heure en php
Résolu
drogba7213
Messages postés
1524
Date d'inscription
Statut
Membre
Dernière intervention
-
drogba7213 Messages postés 1524 Date d'inscription Statut Membre Dernière intervention -
drogba7213 Messages postés 1524 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- Cacul de l'heure en php
- Easy php - Télécharger - Divers Web & Internet
- Changement d'heure - Guide
- Heure de connexion whatsapp qui ne changé pas - Accueil - WhatsApp
- Cdg heure d'arrivée a destination shein ✓ - Forum Consommation & Internet
- Colis shein bloqué CDG - Forum Consommation & Internet
2 réponses
j'avance doucement mais surement voici un up par rapport a mon avancement
si vous pourriez quand meme jeter un coup je n'arrive pas a finaliser
while (odbc_fetch_row($rs))
{
$hdeb=odbc_result($rs,"HEURE_DEBUT");
$hfin=odbc_result($rs,"HEURE_FIN");
$duree = difheure($hdeb,$hfin);
list($hh, $mm, $ss)=explode(":",$duree);
$totalhh = $totalhh + $hh;
$totalmm = $totalmm + $mm;
$totalss = $totalss + $ss;
}
/*if ($totalss >= 60)
{
}
elseif ($totalmm >=60)
{
$totalhh = $totalhh + 1;
$totalmm = $mm%60;
}*/
if ($totalmm >=60 || $totalss >= 60)
{
$retenuess = intval($totalss/60);
$totalmm = $totalmm + $retenue;
$totalss = $totalss%60;
$retenuemm = intval($totalmm/60);
$totalhh = $totalhh + $retenuemm;
$totalmm = $totalmm%60;
}
$totalduree = $totalhh.":".$totalmm.":".$totalss;
si vous pourriez quand meme jeter un coup je n'arrive pas a finaliser
while (odbc_fetch_row($rs))
{
$hdeb=odbc_result($rs,"HEURE_DEBUT");
$hfin=odbc_result($rs,"HEURE_FIN");
$duree = difheure($hdeb,$hfin);
list($hh, $mm, $ss)=explode(":",$duree);
$totalhh = $totalhh + $hh;
$totalmm = $totalmm + $mm;
$totalss = $totalss + $ss;
}
/*if ($totalss >= 60)
{
}
elseif ($totalmm >=60)
{
$totalhh = $totalhh + 1;
$totalmm = $mm%60;
}*/
if ($totalmm >=60 || $totalss >= 60)
{
$retenuess = intval($totalss/60);
$totalmm = $totalmm + $retenue;
$totalss = $totalss%60;
$retenuemm = intval($totalmm/60);
$totalhh = $totalhh + $retenuemm;
$totalmm = $totalmm%60;
}
$totalduree = $totalhh.":".$totalmm.":".$totalss;