Jump to content

Archived

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

natalieG

Date Insert

Recommended Posts

we have a table with a column called NOTEDATE which is of type DATE. We are calcuating the
column 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 Insert
query by putting '$NOTEDATE' in the inseert query, the date shows up invalid'0000-00-00'. I thought
this format was legal.

Janie

Share this post


Link to post
Share on other sites
After the line
[code]$NOTEDATE= $YEAR . '-' . $MONTH . '-' . $DAYARRAY[$DAY];[/code]

what does this output
[code]echo $NOTEDATE;[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.