Hello all, I have a brief question....
I have a MySql database that includes a field of type "Date". I have a javascript method that will create a new record in this tabe and attempt to enter todays current date in the field. Yet every time I try to run it I get an error.....
"Setting dataprovider with name "creation"/type 'DATETIME' with value of wrong type '2004-05-12'"
I have tried several different ways to forumlate the entry with no success. Am I just formating the entry wrong? The odd part is that I can just type the exact same string (2004-05-12) into the field manually with no problem.
I have tried just about every format I can think of and tried different properties of the Date object to enter.
Sample Script...
//New Date Object
today = new Date();
account_to_staffcomment.newRecord();
account_to_staffcomment.account_idaccount = idaccount
//Creation is a field of type "Date"
account_to_staffcomment.creation = today.toDateString();
Thanks for any help you can provide! I promise one day I'll be smarter and answer more questions then I post!
Jim