<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: datetime2 shows timestamp in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4706039#M9558</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to the Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you're using Dataflow Gen2 to ingest data into the Lakehouse via CI/CD and don’t have access to the Spark runtime, options like setting&amp;nbsp;spark.sql.session.timeZone&amp;nbsp;or using Spark-based formatting aren’t available in your case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The difference you're seeing between the Lakehouse preview UI and the SQL Endpoint comes down to how each one handles timestamps. The SQL Endpoint shows full UTC precision (datetime2), while the Lakehouse UI might only show the time portion or adjust it based on your local timezone settings this depends on your client environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To keep things consistent without relying on Spark, you can use a&amp;nbsp;Derived Column&amp;nbsp;in your Dataflow Gen2 to format the timestamp as a string like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formatDateTime([timestamp_column], 'yyyy-MM-dd HH:mm:ss')&lt;/LI-CODE&gt;
&lt;P&gt;This approach ensures the full datetime is preserved during ingestion and avoids any display inconsistencies in the UI.&lt;/P&gt;
&lt;P&gt;If you need precise values for validation or downstream processes, querying through the SQL Endpoint is your best.&lt;/P&gt;
&lt;P&gt;Lastly, as the Lakehouse UI formatting behavior is by design, feel free to submit or upvote an idea here: &lt;A href="https://ideas.fabric.microsoft.com" target="_blank"&gt;https://ideas.fabric.microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please reach out for further assistance.&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider&amp;nbsp;to&amp;nbsp;Accept as the solution&amp;nbsp;to help the other members find it more quickly and a&amp;nbsp;kudos&amp;nbsp;would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Sun, 25 May 2025 01:14:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2025-05-25T01:14:59Z</dc:date>
    <item>
      <title>datetime2 shows timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4704073#M9513</link>
      <description>&lt;P&gt;I have ingested data with df gen2 cicd in lakehouse., one of the columns is datetime2 and shows correct value in sql endpoint&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_0-1747938404309.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1270532i0BDD3A90513AC96F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_0-1747938404309.png" alt="smpa01_0-1747938404309.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But shows strange value in lakehouse&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_1-1747938472611.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1270534iEA3EE51F4BF819F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_1-1747938472611.png" alt="smpa01_1-1747938472611.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there reason for this? How can I have the lakehouse dispay the same datetime2 value as it is displayed by sql endpoint?&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/223"&gt;@miguel&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 18:29:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4704073#M9513</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2025-05-22T18:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: datetime2 shows timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4704178#M9516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it looks like&amp;nbsp;The Lakehouse is likely converting the UTC time from the SQL Endpoint to a different timezone (e.g., `IST` or another local timezone).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set the Lakehouse Spark session to use UTC to match the SQL&lt;/P&gt;&lt;P&gt;spark.conf.set("spark.sql.session.timeZone", "UTC")&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use explicit formatting to show both date and time with fractional seconds:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;df.select(&lt;BR /&gt;date_format("timestamp_column", "yyyy-MM-dd HH:mm:ss.SSSSSS").alias("formatted_ts")&lt;BR /&gt;).show(truncate=False)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 21:30:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4704178#M9516</guid>
      <dc:creator>nilendraFabric</dc:creator>
      <dc:date>2025-05-22T21:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: datetime2 shows timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4704251#M9521</link>
      <description>&lt;P&gt;I am ingesting data in the lakehouse using dataflow gen2 cicd, I have no way to play with spark config&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 00:45:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4704251#M9521</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2025-05-23T00:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: datetime2 shows timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4705407#M9546</link>
      <description>&lt;P&gt;I keep on getting the same values in&lt;/P&gt;
&lt;P&gt;Lakehouse&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_1-1748011684093.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1270857iB1BC4C48A709DEA2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_1-1748011684093.png" alt="smpa01_1-1748011684093.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;vs sql endpoint&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smpa01_0-1748011569523.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1270854iEFC53753E1C41C48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smpa01_0-1748011569523.png" alt="smpa01_0-1748011569523.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 14:49:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4705407#M9546</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2025-05-23T14:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: datetime2 shows timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4706039#M9558</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to the Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you're using Dataflow Gen2 to ingest data into the Lakehouse via CI/CD and don’t have access to the Spark runtime, options like setting&amp;nbsp;spark.sql.session.timeZone&amp;nbsp;or using Spark-based formatting aren’t available in your case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The difference you're seeing between the Lakehouse preview UI and the SQL Endpoint comes down to how each one handles timestamps. The SQL Endpoint shows full UTC precision (datetime2), while the Lakehouse UI might only show the time portion or adjust it based on your local timezone settings this depends on your client environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To keep things consistent without relying on Spark, you can use a&amp;nbsp;Derived Column&amp;nbsp;in your Dataflow Gen2 to format the timestamp as a string like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;formatDateTime([timestamp_column], 'yyyy-MM-dd HH:mm:ss')&lt;/LI-CODE&gt;
&lt;P&gt;This approach ensures the full datetime is preserved during ingestion and avoids any display inconsistencies in the UI.&lt;/P&gt;
&lt;P&gt;If you need precise values for validation or downstream processes, querying through the SQL Endpoint is your best.&lt;/P&gt;
&lt;P&gt;Lastly, as the Lakehouse UI formatting behavior is by design, feel free to submit or upvote an idea here: &lt;A href="https://ideas.fabric.microsoft.com" target="_blank"&gt;https://ideas.fabric.microsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please reach out for further assistance.&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider&amp;nbsp;to&amp;nbsp;Accept as the solution&amp;nbsp;to help the other members find it more quickly and a&amp;nbsp;kudos&amp;nbsp;would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 01:14:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4706039#M9558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-25T01:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: datetime2 shows timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4709850#M9691</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/24978"&gt;@smpa01&lt;/a&gt;&amp;nbsp;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 May 2025 05:32:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/datetime2-shows-timestamp/m-p/4709850#M9691</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-28T05:32:30Z</dc:date>
    </item>
  </channel>
</rss>

