Re: query records by date range using php variables
Posted: Tue Apr 01, 2014 9:13 pm
Here's the code where I set the variables. At first I was trying them as strings which weren't working and thought I needed to get them as datetime type so I converted them as you'll see. Also not working -- obviously.
Thank you.
Code: Select all
$startdatestr = $_POST["StartDate"];
$enddatestr = $_POST["EndDate"];
$startdate = date_create("$startdatestr");
var_dump($stardate);
$enddate = date_create("$enddatestr");
var_dump($enddate);