ms access - Convert string to date using sql and vba -
i have query below in access , wanted use in vba...
sql = "update sales set sales.order_date = cdate(right([data],2)+" / "+mid([data],5,2)+" / "+left([data],4));"
i keep getting error due way building string execute.
i have tried put
& "/" &
to build string error when executing sql...
how should build string?
thanks!!!
you use dateserial if data field of table:
sql = "update sales set sales.order_date = dateserial(left([data],4), mid([data],5,2), right([data],2))"
Comments
Post a Comment