I have a select query which has a date stored as string e.g. 20211231 (Dec 31, 2021). I am trying to use the CDate function to convert the string. If I enter the following in the SQL view
SELECT CDate(Format([XLCustOrdDtl]![DATE_ADDED],"####/##/##")) AS DteAdded
FROM XLCustOrdDtl;
The result are as expected, however when I go back to Design view and run the query, Access reformats the string to
SELECT CDate(Format([XLCustOrdDtl]![DATE_ADDED],"#\/#\/#")) AS DteAdded
FROM XLCustOrdDtl;
This results in #Error
Any thoughts on why this is happening and how I might correct the issue?