I'm not a php programmer, but I inherited some code I'm trying to alter. Basically, everything works ok, (php 5, MSSQL2000), but when it pulls a date out of my SQL db, it's re-formatting the date.
The date is stored in mm/dd/yyyy format, but php is somewhere changing that to: "Aug 29 2000 12:00AM"
Where can I change this formatting? The query is pulling all records and just looping through them, so I don't think I can even apply a "date()" type after-the-fact formatting.
Any help is appreciated, thanks!
My code looks like this:
$qr = mssql_query("SELECT * from ".$table.($condition=="" ? "" : " WHERE ClaimantName = '".$condition."' ORDER BY ClaimantName"));
$r_string = 'n='.mssql_num_rows($qr);
$i = 0;
while ($row = mssql_fetch_assoc ($qr)) {
while (list ($key, $val) = each ($row)) {
$r_string .= '&' . $key . $i . '=' . $val ;
}
$i++;
}
The date is stored in mm/dd/yyyy format, but php is somewhere changing that to: "Aug 29 2000 12:00AM"
Where can I change this formatting? The query is pulling all records and just looping through them, so I don't think I can even apply a "date()" type after-the-fact formatting.
Any help is appreciated, thanks!
My code looks like this:
$qr = mssql_query("SELECT * from ".$table.($condition=="" ? "" : " WHERE ClaimantName = '".$condition."' ORDER BY ClaimantName"));
$r_string = 'n='.mssql_num_rows($qr);
$i = 0;
while ($row = mssql_fetch_assoc ($qr)) {
while (list ($key, $val) = each ($row)) {
$r_string .= '&' . $key . $i . '=' . $val ;
}
$i++;
}