ASP & MYSQL Date formatting problems
Posted on 2006-06-05
I am having date formatting problems with ASP and MYSQL. The date is stored as yyyy-mm-dd in MYSQL but displays as mm/dd/yy when I pull a recordset in Dreamweaver. This is causing a problem when I try to setup and update page because the current record displays in mm/dd/yy format and when the update is submitted MYSQL does not read it properly.
Can someone tell me how to either store the dates in MYSQL as mm/dd/yy, or display them as yyyy-mm-dd so they are consistent? I tried to use the Date_Format function in the Select statement and that worked great when I run the query directly, but when I post the page I get and invalid character error for "%". Here is the SQL statement. If I could get thios to work - problem solved.
SELECT arm.deals.Investor_ID, Pro_ID, Pro_AdminStat, Property_Address1, Property_Address2, Property_Address3, Property_City, Property_State, Property_Zip, DATE_FORMAT(Ext_Date, "%Y-%m-%d") as Ext_Date, Add_Bonus, Settled_Date, Notes, Total_Amt, Pro_DescriptFooter, arm.investors.Investor_ID, Inv_email, Inv_Contact, Pro_DateMod
FROM arm.deals, arm.property_info, arm.investors
WHERE Pro_ID = MMColParam AND arm.deals.Property_ID = arm.property_info.Property_ID AND arm.deals.Investor_ID = arm.investors.Investor_ID
Any help is appreciated. Thanks.