convert sql string to date in ms access

Anonymous
2023-03-09T00:06:55+00:00

HI there, I have a Create_Date in sql that results: 2023-03-08 09:58:05.4470000.

I connect the datatabse to SQL backend but would I would like to convert theCcreate_date to the date format mm/dd/yyyy or however 10 character date format that possible.

Any help is appreciated. thank you in advance.

Microsoft 365 and Office | Access | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. George Hepworth 22,220 Reputation points Volunteer Moderator
    2023-03-09T01:05:27+00:00

    Yes.

    Try this more verbose approach:

    DateSerial(Year([Create_Date]),Month([Create_Date]),Day([Create_Date]))

    2 people found this answer helpful.
    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-03-09T01:12:15+00:00

    I'm still getting Data Type Mismatch in criteria expression.

    0 comments No comments
  2. George Hepworth 22,220 Reputation points Volunteer Moderator
    2023-03-09T01:26:47+00:00

    That suggests you have a string, then, only formatted to look like a date. That happens when you have a DateTime2 datatype in SQL Server, and you use the basic SQL Server driver to connect to the SQL Server database. To make Access recognize it as a date, you'll need to install the newer ODBC driver.

    0 comments No comments