SELECT * FROM billing WHERE inv_date = ?({^2017-01-31})will work both with VFP tables and cursors, either directly or through SPT, and with any SQL back-end (MSSQL, MySQL, Oracle, ...), won't require any intermediate storage, and will assure that date ambiguity won't occur.