Convert String to Date
Posted: Sun May 31, 2009 9:52 am
Hi
I am new to the forum which I found accidentally just now and I am all exited.
Can I ask you first of all what version of phpBB the forum uses as I haven't seen this setup before?
I am a php novice and a program that I am using writes four values to a MySql database the last being "joindate" using now() in a date fiekl and the records are retrieved looping through an array into a list. The date text is in US format and I want to change it to D j M Y. I have tried this but it does not work. Any help would be greatly appreciated:
I am new to the forum which I found accidentally just now and I am all exited.
Can I ask you first of all what version of phpBB the forum uses as I haven't seen this setup before?
I am a php novice and a program that I am using writes four values to a MySql database the last being "joindate" using now() in a date fiekl and the records are retrieved looping through an array into a list. The date text is in US format and I want to change it to D j M Y. I have tried this but it does not work. Any help would be greatly appreciated:
Thank you in advance.$r = mysql_query ("SELECT SQL_CALC_FOUND_ROWS id FROM $table ORDER BY login LIMIT $xlimit,$ylimit;");
$r1 = mysql_query("SELECT FOUND_ROWS() as total;");
$f1 = mysql_fetch_assoc($r1);
$r_rows = mysql_num_rows($r);
for ($x=0;$x<$r_rows;$x++){
$f = mysql_fetch_assoc($r);
$user_list[$x][id] = $f[id];
$rb = mysql_query("SELECT id FROM $table_list WHERE userid='$f[id]';");
for($xb=0;$xb<mysql_num_rows($rb);$xb++){
$fb = mysql_fetch_assoc($rb);
$user_listing[$f[id]][$xb] = $fb[id];
$fb["joindate"]= date("D j M Y", strtotime($datestring));
}
$user_list[$x][listing_count] = count($user_listing[$f[id]]);
}