Hello all,
I have a table with a Date column and a Time column formatted as 'YYYY-MM-DD' and 'HH:MM:SS', respectively. I want to use php to print/ echo the date and time in the following format: "DayOfWeek. Month. DayOfMonth, Year, HH:MM PM" for example "Mon. Oct. 9, 2006 09:30 PM" (which is stored in the table as Col1 - 2006-10-09 and Col2 - 21:30:00).
I attempted to get the Date column formatted with the following php code and I got the following error "Wrong parameter count for date() in web address at line 104.
[php]
<?php
$sql1B = "SELECT Date FROM ShowTimes WHERE ShowID = $Show";
$query1B = mysql_query($sq l1B);
$Date1 = mysql_result($q uery1B, 0);
echo date(D. M. j, Y, $Date1);
?>
[/php]
$Show is a variable that the user selected earlier on the web page.
Any suggestions are greatly appreciated.
Cheers,
Seth
I have a table with a Date column and a Time column formatted as 'YYYY-MM-DD' and 'HH:MM:SS', respectively. I want to use php to print/ echo the date and time in the following format: "DayOfWeek. Month. DayOfMonth, Year, HH:MM PM" for example "Mon. Oct. 9, 2006 09:30 PM" (which is stored in the table as Col1 - 2006-10-09 and Col2 - 21:30:00).
I attempted to get the Date column formatted with the following php code and I got the following error "Wrong parameter count for date() in web address at line 104.
[php]
<?php
$sql1B = "SELECT Date FROM ShowTimes WHERE ShowID = $Show";
$query1B = mysql_query($sq l1B);
$Date1 = mysql_result($q uery1B, 0);
echo date(D. M. j, Y, $Date1);
?>
[/php]
$Show is a variable that the user selected earlier on the web page.
Any suggestions are greatly appreciated.
Cheers,
Seth
Comment