Date Insert Problem in mySQL

  • Thread starter Thread starter Jassim Rahma
  • Start date Start date
J

Jassim Rahma

Hi,

I am using C# to insert a date value from the DatePicker into a DateTime
filed in mySQL database.. I am using the following syntax:

'" + datePicker.Value + "'


I also triend it withour the ' and with #


in the best scenario I will not get any error but the value will not be
saved in the database, so if I have 10 different values of string,
numeric & date then everything will be inserted successfully except the
date value which will not be inserted and will not return any error
message..


can anyone help please.....

Many Thanks,
Jassim Rahma
 
I am using C# to insert a date value from the DatePicker into a DateTime
filed in mySQL database.. I am using the following syntax:

'" + datePicker.Value + "'

Does this fix it...?

'" + datePicker.Value.ToString("yyyy/MM/dd") + "'
I also triend it withour the ' and with #

It needs the apostrophe, not the hash.
 
Thank you very much...


my problem is solved with your answer...



Many Thanks,
Jassim Rahma
 
Back
Top