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

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -