1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| // Traitement pour selectionné les enregistrements de dateLundi à dateDimanche ...
include('connection.inc');
// Conversion des dates aux format US
$date_format_us_lundi = implode('-', array_reverse(explode('/', $dateLundi)));
$date_format_us_dimanche = implode('-', array_reverse(explode('/', $dateDimanche)));
// Création timestamp en conséquence
$time_lundi = strtotime($date_format_us_lundi);
$time_dimanche= strtotime($date_format_us_dimanche);
// Conversion des dates en MM/DD/YYYY
$dateLundi=date("m/d/Y",$time_lundi);
$dateDimanche=date("m/d/Y",$time_dimanche);
//SQL
$sql = "SELECT T_TACHE.* FROM T_TACHE WHERE date_tache BETWEEN #".$dateLundi."# AND #".$dateDimanche."#";
echo $sql;
$rs = odbc_exec($cnx,$sql);
$nbEnr = odbc_num_rows($rs);
echo "<br/>Nb Enr :".$nbEnr ; |
Partager