I'm connecting to the DB with LibreOffice Base, and initially forgot that this isn't a MySQL db (it's our only non-mysql db), so I have to say thanks to those from the other forum who helped get me started when I mis-posted.
Anyhow, here's what I've got:
SELECT DISTINCT c.primaryemailaddress, c.companyname, CAST(m.maxdate AS DATETIME ) AS maxDateCreated FROM companycontact AS c, (SELECT so.companyname, MAX(so.date_created) AS maxdate FROM ordhed_sales AS so, company AS co WHERE so.companyname = co.companyname AND co.isOEM = '1' GROUP BY so.companyname) AS m WHERE c.companyname = m.companyname AND c.primaryemailaddress IS NOT NULL AND c.primaryemailaddress NOT LIKE '' AND c.primaryemailaddress NOT LIKE ' ' ORDER BY m.maxdate DESC
When I run the sub-query by itself, the date_created value gets returned as expected ... as a date value.
However, when I run it as shown above, the values get returned like 40751.31, or 40750.6, or 40750.52, etc....
What do I need to do in order to have it returned in a date value??