<?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 conversion issue in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/840680#M28186</link>
    <description>&lt;P&gt;Hi Hicham,&lt;/P&gt;
&lt;P&gt;You could try below M code to see whether it work or not.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrTQdSwoUorVATN9EyshTEtdr8Q8GNM3sQguWgoUjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [month = _t]),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each "20"&amp;amp;[month]&amp;amp;"-01"),
    #"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type date}})
in
    #"Changed Type"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Zoe Zhi&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2019 06:54:59 GMT</pubDate>
    <dc:creator>dax</dc:creator>
    <dc:date>2019-11-08T06:54:59Z</dc:date>
    <item>
      <title>Date format conversion issue</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/839896#M28138</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm working on a query and I would convert a date column type text to a date format and I have this error message :&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;DataFormat.Error: Sorry ... We were unable to parse the input provided to a Date value.

Details:

April-19&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Do you have any tips to solve this issue?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answer.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 13:31:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/839896#M28138</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-07T13:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion issue</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/839918#M28139</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you provide a data sample?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;Best Regards,&lt;BR /&gt;Mariusz&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accepting it as the solution&lt;/I&gt;&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Please feel free to connect with me.&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/mariusz-repczynski-065a7362/" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/1232d707bb27fc4afa3b81cd0702c478b6f7aced/68747470733a2f2f7374617469632e6c6963646e2e636f6d2f736364732f636f6d6d6f6e2f752f696d616765732f6c6f676f732f6c696e6b6564696e2f6c6f676f5f6c696e6b6564696e5f39337832315f76322e706e67" border="0" alt="Mariusz Repczynski" /&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 13:49:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/839918#M28139</guid>
      <dc:creator>Mariusz</dc:creator>
      <dc:date>2019-11-07T13:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion issue</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/839958#M28142</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="81408" data-lia-user-login="Mariusz" class="lia-mention lia-mention-user"&gt;Mariusz&lt;/a&gt;&amp;nbsp;here a data sample:&lt;/P&gt;&lt;P&gt;For information, the data came from the CSV file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;the column Date (Date format) is the attending result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;regards,&amp;nbsp;&lt;/P&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;</description>
      <pubDate>Thu, 07 Nov 2019 14:37:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/839958#M28142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-07T14:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion issue</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/840319#M28159</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(Source, "Date (Date format)", each Date.FromText("01-" &amp;amp; Text.End([#"Date (text format)"],3) &amp;amp; "-" &amp;amp; Text.Start([#"Date (text format)"],2)), type date)&lt;/LI-CODE&gt;&lt;P&gt;where &lt;EM&gt;Source&lt;/EM&gt; needs to be replaced by a preceding step name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or from ribbon Add Column &amp;gt; Custom Column and use this formula:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Date.FromText("01-" &amp;amp; Text.End([#"Date (text format)"],3) &amp;amp; "-" &amp;amp; Text.Start([#"Date (text format)"],2))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 21:58:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/840319#M28159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-07T21:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Date format conversion issue</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/840680#M28186</link>
      <description>&lt;P&gt;Hi Hicham,&lt;/P&gt;
&lt;P&gt;You could try below M code to see whether it work or not.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrTQdSwoUorVATN9EyshTEtdr8Q8GNM3sQguWgoUjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [month = _t]),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each "20"&amp;amp;[month]&amp;amp;"-01"),
    #"Changed Type" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type date}})
in
    #"Changed Type"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Zoe Zhi&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 06:54:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Date-format-conversion-issue/m-p/840680#M28186</guid>
      <dc:creator>dax</dc:creator>
      <dc:date>2019-11-08T06:54:59Z</dc:date>
    </item>
  </channel>
</rss>

