Convert DateTimeOffset from SQL Server to DateTime in VBA (ADO) RRS feed

  • Question

  • How can I convert DateTimeOffset to DateTime in Access VBA. I'm pulling in rows from SQL Server using an ADODB.RecordSet. But the values appear as rubbish '?93'

    I've searched google, but can't find anything for VBA.

    Tuesday, June 18, 2019 12:23 PM

All replies

  • In your SQL query, use CONVERT(datetime, [column_name]) AS [column_name]. The query must be a SQL Passthrough query.
    Wednesday, June 26, 2019 12:39 AM