B
B
bmw_man8602021-05-24 12:23:53
PHP
bmw_man860, 2021-05-24 12:23:53

How to display data from the access database by date filter (start date and end date)?

<?php
$conn = odbc_connect("sprut.mdb","","");
$ret = odbc_exec($conn, "SELECT History.DateTime, History.Sm_Key, History.ClientsId, OilTypes.OilName,
History.LiterDeliv, History.AmountDeliv
FROM (History INNER JOIN Fuel_Tank ON History.RezNumber = Fuel_Tank.RezNumber) INNER JOIN OilTypes ON
Fuel_Tank.OilKey = OilTypes.OilKey
WHERE (((History.LiterDeliv)>0))");
echo "Sales

the dateProductShift NumberReleased, L.Released, rub.
".$row['DateTime']." ".$row['OilName']." ".$row['Sm_Key']." ".$row['LiterDeliv']." ".$row['AmountDeliv']."
";
?>

How to display data only for a certain period of time? DateTime is displayed in the format 04/19/2021 12:49:35, and filter by the beginning of 04/01/2021 to 04/30/2021

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Reshetnyak, 2021-05-24
@trjflash

Format the date as you need, you can discard the tail with the time manual

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question