Pokeguy
12-11-2000, 04:18 AM
Hi, i have a database of around 1000 stock prices at a different dates and i want to display them all in a table.
The problem is, the dates displayed in column 1 of the table is in the form
YYYY-MM-DD
I want to change the form to MM DD, YYYY.
This following section from a script displays the dates correctly, but not in the format i want.
{
printf("<tr><td>%s</td><td>%s/</td><td>%s</td></tr>\n",
$myrow["Date"]), $myrow["Point"], $myrow["Low"]);
}
I tried changing that part to the following, but now, instead of giving me a list
of dates(which go from earliest to present), it gives me the exactly SAME date over and over again(eg. repeats Jan 1, 1998 over and over again in the loop).
what's wrong with this script?
{
printf("<tr><td>%s</td><td>%s/</td><td>%s</td></tr>\n",
date('M D Y',$myrow["Date"]), $myrow["Point"], $myrow["Low"]);
}
anyone know why??
Thanx in advance[nbsp]
The problem is, the dates displayed in column 1 of the table is in the form
YYYY-MM-DD
I want to change the form to MM DD, YYYY.
This following section from a script displays the dates correctly, but not in the format i want.
{
printf("<tr><td>%s</td><td>%s/</td><td>%s</td></tr>\n",
$myrow["Date"]), $myrow["Point"], $myrow["Low"]);
}
I tried changing that part to the following, but now, instead of giving me a list
of dates(which go from earliest to present), it gives me the exactly SAME date over and over again(eg. repeats Jan 1, 1998 over and over again in the loop).
what's wrong with this script?
{
printf("<tr><td>%s</td><td>%s/</td><td>%s</td></tr>\n",
date('M D Y',$myrow["Date"]), $myrow["Point"], $myrow["Low"]);
}
anyone know why??
Thanx in advance[nbsp]