Share via

Fix format of a datetime column in Copy Activity's Mapping section

BadMan 40 Reputation points
2026-03-10T05:26:33.38+00:00

We have set format of a Datetime column to "G" and "en-US" in mapping section of copy activity. Here our source is Azure SQL db and Destination is ADLS. The format of the datatype is as expected.
Here is the type conversion setting:
User's image

Here is the desired output:
User's image

However, when we change the source to Fabric warehouse but apply same type conversion settings in mapping section of copy activity, we are getting results in different format.
Type conversion setting:
User's image

Output:
User's image

We don't want AM/PM after our datetime. Is there something we can change in type conversion settings?

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments
{count} votes

Answer accepted by question author
  1. Manoj Kumar Boyini 10,265 Reputation points Microsoft External Staff Moderator
    2026-03-13T12:44:25.64+00:00

    Hi BadMan

    This behavior is related to Microsoft Fabric Warehouse.

    When Fabric Warehouse is used as the source, datetime values are serialized by Fabric’s engine before they are passed to downstream services such as Azure Data Factory. Because of this, formatting options configured in ADF (for example, datetime format or culture in Copy Activity mappings) are not always honored, and Fabric’s default datetime representation (including AM/PM) is applied.

    This explains why the same Copy Activity mapping behaves differently when:

    • Azure SQL Database is used as the source (format is respected), versus
    • Fabric Warehouse is used as the source (AM/PM appears).

    At present, the reliable way to control the datetime format is to:

    • Explicitly format the datetime column in the Fabric SQL query, or
    • Apply formatting in a downstream transformation step.

    Posting this here in the Fabric Community so Fabric experts can confirm whether this is a known limitation or if there is a supported way in Fabric to control datetime serialization behavior.

    Fabric Community:
    https://community.fabric.microsoft.com/

    0 comments No comments

Answer accepted by question author
  1. Alex Burlachenko 19,690 Reputation points Volunteer Moderator
    2026-03-11T06:21:20.5233333+00:00

    BadMan hi,

    the reason u are seeing AM PM is because format G with culture en US uses the general date time pattern for that culture and in en US the short time pattern is 12 hour with AM PM. So technically nothing is wrong it is just following culture rules.

    If u do not want AM PM dont use G. Instead use an explicit 24 hour format string like yyyy MM dd HH mm ss or for example MM dd yyyy HH mm ss depending on what u need. The key is using HH instead of hh and not relying on culture based general formats.

    So in the mapping section change DateTime format from G to something like yyyy-MM-dd HH:mm:ss and keep culture if needed but once u define the exact format string the culture will not force AM PM anymore.

    The difference between Azure SQL and Fabric warehouse likely comes from slight differences in how the connector handles type conversion but the safe and consistent solution is to stop using G and define the full 24 hour format manually.

    rgds,

    Alex

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.