try_convert question to convert nvarchar to datetime

rdboy_9727 61 Reputation points
2022-01-16T02:11:28.173+00:00

Hi guys,
please can you help to convert column eventime (nvarchar) to event_time_date.
thanks in advance

165285-image.png

Azure SQL Database
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,402 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
715 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,615 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-01-17T11:20:22.26+00:00

    Hi @rdboy_9727 ,

    Thank you for posting query.

    You can use FORMAT() function to format dates.

    Similarly kind of issue addressed in below link. Kindly check it once and let us know if that helps.
    https://learn.microsoft.com/en-us/answers/questions/696491/index.html

    Hope this will help. Please let us know if any further queries.

    ------------------

    Please consider hitting Accept Answer button. Accepted answers helps community as well.