<?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: issues with datetime2 and datetime functions in fabric warehouse in Data Warehouse</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5141207#M4419</link>
    <description>&lt;P&gt;Link to Fabric Ideas&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/T-SQL-datetime2-and-datetime-functions-should-return-supported/idi-p/5125923" target="_blank"&gt;T-SQL datetime2 and datetime functions should retu... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2026 14:13:12 GMT</pubDate>
    <dc:creator>lbilali</dc:creator>
    <dc:date>2026-03-30T14:13:12Z</dc:date>
    <item>
      <title>issues with datetime2 and datetime functions in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5124888#M4305</link>
      <description>&lt;P&gt;DATETIME is not supported in Fabric Warehouse yet GETDATE() and GETUTCDATE() return DATETIME&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Running the code below&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select GETDATE() AS clm1, GETUTCDATE() AS clm2
into dbo.test_table&lt;/LI-CODE&gt;&lt;P&gt;fails with teh error:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Msg 24574, Level 16, State 1, Line 6
The data type 'datetime' is not supported in this edition of SQL Server.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's fine to remove a data type but then remove it from everywhere&lt;BR /&gt;&lt;BR /&gt;On the other hand functions&amp;nbsp;SYSDATETIME() and SYSUTCDATETIME() return a DATETIME2(7) but only precission up to 6 is supported as a data type on a table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code below fails as well&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select SYSDATETIME() AS clm1, SYSUTCDATETIME() AS clm2
into dbo.test_table&lt;/LI-CODE&gt;&lt;P&gt;with error&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Msg 24597, Level 16, State 1, Line 3
An integer precision value between 0 and 6 must be specified.&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;the issues are there for other datetime functions like &lt;SPAN&gt;CURRENT_TIMESTAMP&amp;nbsp;&lt;/SPAN&gt;as well&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I understand that those cases can be fixed by converting to correct data type/precission&lt;BR /&gt;but this should not be the case in the first place&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 12:58:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5124888#M4305</guid>
      <dc:creator>lbilali</dc:creator>
      <dc:date>2026-03-03T12:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: issues with datetime2 and datetime functions in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5125364#M4308</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="838965" data-lia-user-login="lbilali" class="lia-mention lia-mention-user"&gt;lbilali&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for reaching out to Microsoft Fabric Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Fabric Data Warehouse, the supported T SQL surface area is a subset of the SQL Server engine. The DATETIME data type is not supported, and DATETIME2 is the recommended type for storing date and time values, with supported precision up to 6.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/fabric/data-warehouse/data-types#:~:text=The%20precision%20for%20datetime2%20and%20time%20is%20limited%20to%206%20digits%20of%20precision%20on%20fractions%20of%20seconds." target="_self"&gt;Data types in Fabric Data Warehouse&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/sql/t-sql/data-types/datetime2-transact-sql?view=fabric&amp;amp;preserve-view=true" target="_blank"&gt;datetime2 (Transact-SQL) - SQL Server | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Fabric Warehouse uses a reduced T SQL type system because the storage engine is optimized for distributed analytics and Parquet based storage, where types like DATETIME2 align better with the underlying architecture.&lt;/P&gt;
&lt;P&gt;Functions such as GETDATE(), GETUTCDATE(), and CURRENT_TIMESTAMP still return DATETIME due to their historical SQL Server definitions. Since DATETIME cannot be used as a table column type in Fabric Warehouse, using these functions directly in operations like SELECT INTO results in the error you observed. Similarly, SYSDATETIME() and SYSUTCDATETIME() return DATETIME2(7), while Fabric Warehouse supports precision only up to 6.&lt;/P&gt;
&lt;P&gt;In these cases, the value needs to be explicitly cast to a supported type and precision such as DATETIME2(6) before writing it to a table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you think this behaviour should be improved, you may consider sharing the suggestion in the &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/idb-p/fbc_ideas" target="_self"&gt;Fabric Ideas forum&lt;/A&gt;. This helps bring it to the attention of the product team for review.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please reach out for further assistance.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 10:39:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5125364#M4308</guid>
      <dc:creator>v-veshwara-msft</dc:creator>
      <dc:date>2026-03-04T10:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: issues with datetime2 and datetime functions in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5125915#M4312</link>
      <description>&lt;P&gt;Thanks for the link to Fabric Ideas forum&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I think this belogs there if it is not yet.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2026 08:24:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5125915#M4312</guid>
      <dc:creator>lbilali</dc:creator>
      <dc:date>2026-03-05T08:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: issues with datetime2 and datetime functions in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5127890#M4318</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="838965" data-lia-user-login="lbilali" class="lia-mention lia-mention-user"&gt;lbilali&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-start="49" data-end="74"&gt;Thank you for the update.&lt;/P&gt;
&lt;P data-start="76" data-end="271"&gt;If you have submitted it in the Fabric Ideas forum, please feel free to share the link here as well. It can help others in the community track the suggestion and add their votes or feedback.&lt;/P&gt;
&lt;P data-start="76" data-end="271"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="76" data-end="271"&gt;Please reach out for further assistance.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2026 05:52:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5127890#M4318</guid>
      <dc:creator>v-veshwara-msft</dc:creator>
      <dc:date>2026-03-09T05:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: issues with datetime2 and datetime functions in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5141207#M4419</link>
      <description>&lt;P&gt;Link to Fabric Ideas&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/T-SQL-datetime2-and-datetime-functions-should-return-supported/idi-p/5125923" target="_blank"&gt;T-SQL datetime2 and datetime functions should retu... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 14:13:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5141207#M4419</guid>
      <dc:creator>lbilali</dc:creator>
      <dc:date>2026-03-30T14:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: issues with datetime2 and datetime functions in fabric warehouse</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5141527#M4421</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="838965" data-lia-user-login="lbilali" class="lia-mention lia-mention-user"&gt;lbilali&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you for sharing the Ideas link. This will help others with similar requirements upvote it, increasing the chances of consideration by the product team.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2026 03:43:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Warehouse/issues-with-datetime2-and-datetime-functions-in-fabric-warehouse/m-p/5141527#M4421</guid>
      <dc:creator>v-veshwara-msft</dc:creator>
      <dc:date>2026-03-31T03:43:51Z</dc:date>
    </item>
  </channel>
</rss>

