natalieG Posted May 18, 2006 Share Posted May 18, 2006 we have a table with a column called NOTEDATE which is of type DATE. We are calcuating thecolumn value by the followingL[b]$NOTEDATE= $YEAR . '-' . $MONTH . '-' . $DAYARRAY[$DAY]; [/b]where $DATARRAY[] returns the string vakuer for the form daee in YYYY-MM-DD format. We checked this put and it does indeed pront the desired string. But, when we use the string in an Insertquery by putting '$NOTEDATE' in the inseert query, the date shows up invalid'0000-00-00'. I thoughtthis format was legal.Janie Link to comment https://forums.phpfreaks.com/topic/9949-date-insert/ Share on other sites More sharing options...
Barand Posted May 18, 2006 Share Posted May 18, 2006 After the line[code]$NOTEDATE= $YEAR . '-' . $MONTH . '-' . $DAYARRAY[$DAY];[/code]what does this output[code]echo $NOTEDATE;[/code] Link to comment https://forums.phpfreaks.com/topic/9949-date-insert/#findComment-36995 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.