hi there i am inserting a desired formated date ie
m-d-y --------2-23-2008
into mysql database in which i have the field named Bill_date which has the format Date here is my query
i have swapped he statement DATE_FORMAT('$s eldate','USA') to DATE_FORMAT('US A','$seldate') also but it still gives me the same error the date i am posting the date from a form and it is properly posted into this page and is showing the value in the variable $seldate
but i am recieving the following error
m-d-y --------2-23-2008
into mysql database in which i have the field named Bill_date which has the format Date here is my query
Code:
$sqlAS="insert into sale_rec(Bill_no,Bill_date,Cust_name,Mop,Con_per,Con_no,Code_no,Prt_no,Stk_avl,Stk_req,U_prc,T_prc,Prd)
values('$billno',DATE_FORMAT('$seldate','USA'),'$cname','$mop','$cper','$cno','$codeno','$prt','$stkavl','$stkreq','$uprc','$tprc','$prd')";
but i am recieving the following error
Code:
Column 'Bill_date' cannot be null
insert into sale_rec(Bill_no,Bill_date,Cust_name,Mop,Con_per,Con_no,Code_no,Prt_no,Stk_avl,Stk_req,U_prc,T_prc,Prd) values('1007',DATE_FORMAT('02-23-2008','USA'),'sameeer','CHEQUE','oemr','0321','1000','CSV-4456','13','1','500','500','WATER_FILTER')
Comment