CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 ASP frontend MySQL backend dates

Print topic Send  topic

Author Message
Waspman

Posts: 948
Posted: 05/26/2011, 7:31 AM

Trying to update a date field with custom script. worked fine with an Access db but not with MySQL.,

This is the script...


DBConnection1.Execute ("UPDATE orders SET Despatched=1, item_despatched = '"& orders1.Despatched_Date.Value &"' where cart_session_id='"& Request.QueryString("cartID") &"'")

Any help would be appreciated:)
_________________
http://www.waspmedia.co.uk
View profile  Send private message
Oper


Posts: 1195
Posted: 05/26/2011, 8:23 AM

DBConnection1.Execute ("UPDATE orders SET Despatched=1, item_despatched = '"& MYSQLDATE(orders1.Despatched_Date.Value) &"' where cart_session_id='"& Request.QueryString("cartID") &"'")


  
Function MySQLDate(fecha)  
MySQLDate =         CCFormatDate(fecha,array("yyyy","-","mm","-","dd" ))  
End Function  


i dont has to explain you why. :)

we decided to create a fucntion casue we used so many time and quick to doit this way
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.