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

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -