i need select data, end i need change column date_payment with DateTime to Text, please help…
i write this query
SELECT r.id, user_name, user_phone, date_create, REPLACE( date_payment, '0000-00-00 00:00:00', 'No payment' ) , payment_method, amount, rs.name_ru
FROM request AS r, request_status AS rs
WHERE r.status = rs.id
LIMIT 0 , 30
in sql console query is valid, and date_payment is replase, but:
MySqlCommand cmd = new MySqlCommand(query, conn);
dt.Load(cmd.ExecuteReader());
GetList();
source.DataSource = dt;
dataGrid1.ItemsSource = source;
then column(date_payment) in datagrid is null – why?
Your calculated column doesn’t have any name. Add “AS updated_date_payment” keyword and request “updated_date_payment” column in your program: