Hi all
I want to save the current date in a database field in the following format dd/mm/yyyy for example 18/06/2007. How can i do this. The following is code I've used to assign nulls to my values but the value Bkg_created_dat e should contain the current date in the format mentioned above . I've tried to insert lines code as in lined 13,14,15 but it does not work
[PHP]<?
$row = array(
"Bkg_Serial No" => "",
"Bkg_FileNo " => "",
"Bkg_Ent_Na me" => "",
"Bkg_Ent_Ta n" => "",
"Bkg_Created_Dt " => "",
"Bkg_Mod_Dt " => "",
"Bkg_Mod_Us r" => "",
"Bkg_BnkId" => "",
"Bkg_OffId" => "",
"Bkg_DepId" => "");
$sql= ' SELECT DATE_FORMAT(cur rent_date, \'%d/%m/%Y\') AS date';
$res = mysql_query($sq l, $conn) or die(mysql_error ());
$row["Bkg_Created_Dt "]= mysql_fetch_ass oc($res["date"]) ;[/PHP]
Thanks in advance
I want to save the current date in a database field in the following format dd/mm/yyyy for example 18/06/2007. How can i do this. The following is code I've used to assign nulls to my values but the value Bkg_created_dat e should contain the current date in the format mentioned above . I've tried to insert lines code as in lined 13,14,15 but it does not work
[PHP]<?
$row = array(
"Bkg_Serial No" => "",
"Bkg_FileNo " => "",
"Bkg_Ent_Na me" => "",
"Bkg_Ent_Ta n" => "",
"Bkg_Created_Dt " => "",
"Bkg_Mod_Dt " => "",
"Bkg_Mod_Us r" => "",
"Bkg_BnkId" => "",
"Bkg_OffId" => "",
"Bkg_DepId" => "");
$sql= ' SELECT DATE_FORMAT(cur rent_date, \'%d/%m/%Y\') AS date';
$res = mysql_query($sq l, $conn) or die(mysql_error ());
$row["Bkg_Created_Dt "]= mysql_fetch_ass oc($res["date"]) ;[/PHP]
Thanks in advance
Comment