Jump to content

mysql-php date error


birbal

Recommended Posts

i have a date field in mysql datbase. it is giving a mysql error. cant find the reason behind it.problem is if i pass suppose 1900-12-20.it is showing...Incorrect date value: '1868' for column 'bday' at row 1i checked by changing input value. but evereytime its showing error along with a random YEAR (like above '1868') where i am mistaking?

Link to comment
Share on other sites

You're not passing the date "1900-12-20", you're passing the number that 1900 - 12 - 20 is equal to, which is 1868. Try quoting the value.

Link to comment
Share on other sites

You're not passing the date "1900-12-20", you're passing the number that 1900 - 12 - 20 is equal to, which is 1868. Try quoting the value.
ohh my mistake. thanks. sorry it is working now. thanks again
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...