<?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: Date format of STRING changes in completely unrelated dataflow step in Dataflow</title>
    <link>https://community.fabric.microsoft.com/t5/Dataflow/Date-format-of-STRING-changes-in-completely-unrelated-dataflow/m-p/4284900#M4601</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are some of my personal thoughts on your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I noticed that the data type of the “posting date” column shown in your picture is not date/time or date type.&lt;/P&gt;
&lt;P&gt;So I think you need to make sure that the column is of date type first.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. I also think you can change the updated version of the query with explicit date format:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
  Source = Sql.Databases("connection"),
  Navigation = Source{[Name = "database"]}[Data],
  #"Navigation 1" = Navigation{[Schema = "dbo", Item = "table_name"]}[Data],
  Custom = Table.TransformColumns(#"Navigation 1", {{"posting date", each DateTime.ToText(_, "yyyy-MM-dd", "en-US"), type text}}),
  CustomText = Table.TransformColumnTypes(Custom, List.Transform(Table.ColumnNames(Custom), each {_, type text})),
  #"Removed columns" = Table.RemoveColumns(CustomText, {"timestamp"})
in
  #"Removed columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 01:38:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-15T01:38:27Z</dc:date>
    <item>
      <title>Date format of STRING changes in completely unrelated dataflow step</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Date-format-of-STRING-changes-in-completely-unrelated-dataflow/m-p/4284166#M4599</link>
      <description>&lt;P&gt;I have a dataflow that transforms all columns to string and then removes a column. The datetime columns are transformed to string and then, when I remove the column, the format of the date within the string (!), so retroactively, changes it's format. This is madness, but it doesn't stop there: when I make a new query or even a new dataflow, this error comes back. As far as I can tell, the sufficient steps after getting the data are the aforementioned two.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how it looks before the change (pay attention to the "posting date" column):&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is after:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't even an English date format, despite me explicitly stating that in the first step. The whole query is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
  Source = Sql.Databases("connection"),
  Navigation = Source{[Name = "database"]}[Data],
  #"Navigation 1" = Navigation{[Schema = "dbo", Item = "table_name"]}[Data],
  Custom = Table.TransformColumnTypes(#"Navigation 1", List.Transform(Table.ColumnNames(#"Navigation 1"), each{_, type text, "en-us"})),
  #"Removed columns" = Table.RemoveColumns(Custom, {"timestamp"})
in
  #"Removed columns"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have any idea? Can I get rid of this? (How can a commercial software be this broken...?)&lt;BR /&gt;&lt;BR /&gt;EDIT: You're misunderstanding me. I don't want the string to change, and why should it if I just remove some completely unrelated column? I am just fascinated that the string is changing in a way that is obviously recognizing that the string was once a date. But it isn't anymore.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 08:21:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Date-format-of-STRING-changes-in-completely-unrelated-dataflow/m-p/4284166#M4599</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-15T08:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date format of STRING changes in completely unrelated dataflow step</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Date-format-of-STRING-changes-in-completely-unrelated-dataflow/m-p/4284386#M4600</link>
      <description>&lt;P&gt;Instead of converting the date column only to text, can you specify a date formatting for the string too? It may be looking something like this for the date column:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Table.TransformColumns(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; #"PreviousStep",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; {{&lt;/SPAN&gt;&lt;SPAN&gt;"DateColumn"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;each&lt;/SPAN&gt;&lt;SPAN&gt; Date.ToText(_, &lt;/SPAN&gt;&lt;SPAN&gt;"dd-MMM-yyyy"&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;type&lt;/SPAN&gt; &lt;SPAN&gt;text&lt;/SPAN&gt;&lt;SPAN&gt;}}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Nov 2024 16:33:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Date-format-of-STRING-changes-in-completely-unrelated-dataflow/m-p/4284386#M4600</guid>
      <dc:creator>FabianSchut</dc:creator>
      <dc:date>2024-11-14T16:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Date format of STRING changes in completely unrelated dataflow step</title>
      <link>https://community.fabric.microsoft.com/t5/Dataflow/Date-format-of-STRING-changes-in-completely-unrelated-dataflow/m-p/4284900#M4601</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are some of my personal thoughts on your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. I noticed that the data type of the “posting date” column shown in your picture is not date/time or date type.&lt;/P&gt;
&lt;P&gt;So I think you need to make sure that the column is of date type first.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. I also think you can change the updated version of the query with explicit date format:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
  Source = Sql.Databases("connection"),
  Navigation = Source{[Name = "database"]}[Data],
  #"Navigation 1" = Navigation{[Schema = "dbo", Item = "table_name"]}[Data],
  Custom = Table.TransformColumns(#"Navigation 1", {{"posting date", each DateTime.ToText(_, "yyyy-MM-dd", "en-US"), type text}}),
  CustomText = Table.TransformColumnTypes(Custom, List.Transform(Table.ColumnNames(Custom), each {_, type text})),
  #"Removed columns" = Table.RemoveColumns(CustomText, {"timestamp"})
in
  #"Removed columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 01:38:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Dataflow/Date-format-of-STRING-changes-in-completely-unrelated-dataflow/m-p/4284900#M4601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-15T01:38:27Z</dc:date>
    </item>
  </channel>
</rss>

