You're using the wrong names in your array index:
//date_format(date,'%Y/%m/%d') as d
$date = $listings['date'];
//time_format(starttime, '%h:%i%p') as t
$starttime = $listings['starttime'];
SELECT `something` AS `something_else`
, you're returning the column name as
"something_else", not the original "something". Thus, you need to be using "d" and "t" as your array keys in those two lines, I think.
EDIT: By the way, "date" is a reserved word in MySQL (and probably other systems). If you must use reserved words as fields names, wrap them in backticks/graves (that's the "`
" character to the left of the number 1 key on a standard US keyboard) when using those names in queries.