mysql - how to change the date format as it not the same with the database -
as coding show @ textbox 18/02/2012 (for example). in database 02/18/2012.
txtreqdate.text = calendar.selectionstart.tostring("dd/mm/yyyy") cbotermcode.focus() calendar.visible = false
but when want retrieve related data date using coding below :
sqlcbo2 = "select distinct gear_code gear est_start_date='" & txtreqdate.text & "'"
it invalid date. cannot change date format in database.
if change code txtreqdate.text = calendar.selectionstart.tostring("dd/mm/yyyy") txtreqdate.text = calendar.selectionstart.toshortdatestring appear 02/18/2012 @ textbox data appear want 18/02/2012 appear @ textbox.
you make use of str_to_date function parse data , transform date value.
use (correct syntactical error):
where should put it. example??
sqlcbo2 = "select distinct gear_code gear est_start_date=str_to_date('" & txtreqdate.text & "','%d/%m/%y')"
Comments
Post a Comment