<?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: How to convert number to date, 5 &amp;amp; 6 digits to dd/mm/yyyy in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-number-to-date-5-amp-6-digits-to-dd-mm-yyyy/m-p/2446898#M65713</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334373" data-lia-user-login="feralvarez994" class="lia-mention lia-mention-user"&gt;feralvarez994&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;AT_FECHAS_1_NEW =
VAR Length =
    LEN ( Table[AT_FECHAS_10] )
VAR Modified =
    IF ( Length = 7, "0" &amp;amp; Table[AT_FECHAS_10], Table[AT_FECHAS_10] )
VAR TheYear =
    VALUE ( RIGHT ( Modified, 4 ) )
VAR TheMonth =
    VALUE ( MID ( Modified, 3, 2 ) )
VAR TheDay =
    VALUE ( LEFT ( Modified, 2 ) )
RETURN
    DATE ( TheYear, TheMonth, TheDay )&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;AT_FEC_A_VENTA_NEW =
VAR Length =
    LEN ( Table[AT_FEC_A_VENTA] )
VAR Modified =
    IF ( Length = 5, "0" &amp;amp; Table[AT_FEC_A_VENTA], Table[AT_FEC_A_VENTA] )
VAR TheYear =
    VALUE ( "20" &amp;amp; RIGHT ( Modified, 2 ) )
VAR TheMonth =
    VALUE ( MID ( Modified, 3, 2 ) )
VAR TheDay =
    VALUE ( LEFT ( Modified, 2 ) )
RETURN
    DATE ( TheYear, TheMonth, TheDay )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2022 22:05:51 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-04-08T22:05:51Z</dc:date>
    <item>
      <title>How to convert number to date, 5 &amp; 6 digits to dd/mm/yyyy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-number-to-date-5-amp-6-digits-to-dd-mm-yyyy/m-p/2446827#M65703</link>
      <description>&lt;P&gt;Hi everybody! I'm wondering how do i do to convert a number string to a date string, i have this diferrents formats and i can not find out how to convert them to a date string.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the first problem, i have text strings with 7 and 8 length, the last 4 digits are for the year, mean the previous 2 mean the month, and the first one is the day. An example is:&lt;/P&gt;&lt;P&gt;- 4112006 = 4/11/2006 (4th of November 2006)&lt;/P&gt;&lt;P&gt;I can do this if there's only 8 digits strings with the date, left, and right function but dont know how to do it with de 7th strings.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, i have other columns that refers the date in 5 or 6 digit strings, like this example:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Examples in this columns:&lt;/P&gt;&lt;P&gt;10917 refers to 1th of September 2017 (the 0 refers to the month)&lt;BR /&gt;101121 refers to 10th of November 2021.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope to be clear, anything else that you need i am here to answer. Thanks everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 20:30:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-number-to-date-5-amp-6-digits-to-dd-mm-yyyy/m-p/2446827#M65703</guid>
      <dc:creator>feralvarez994</dc:creator>
      <dc:date>2022-04-08T20:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert number to date, 5 &amp; 6 digits to dd/mm/yyyy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-number-to-date-5-amp-6-digits-to-dd-mm-yyyy/m-p/2446898#M65713</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="334373" data-lia-user-login="feralvarez994" class="lia-mention lia-mention-user"&gt;feralvarez994&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;AT_FECHAS_1_NEW =
VAR Length =
    LEN ( Table[AT_FECHAS_10] )
VAR Modified =
    IF ( Length = 7, "0" &amp;amp; Table[AT_FECHAS_10], Table[AT_FECHAS_10] )
VAR TheYear =
    VALUE ( RIGHT ( Modified, 4 ) )
VAR TheMonth =
    VALUE ( MID ( Modified, 3, 2 ) )
VAR TheDay =
    VALUE ( LEFT ( Modified, 2 ) )
RETURN
    DATE ( TheYear, TheMonth, TheDay )&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;AT_FEC_A_VENTA_NEW =
VAR Length =
    LEN ( Table[AT_FEC_A_VENTA] )
VAR Modified =
    IF ( Length = 5, "0" &amp;amp; Table[AT_FEC_A_VENTA], Table[AT_FEC_A_VENTA] )
VAR TheYear =
    VALUE ( "20" &amp;amp; RIGHT ( Modified, 2 ) )
VAR TheMonth =
    VALUE ( MID ( Modified, 3, 2 ) )
VAR TheDay =
    VALUE ( LEFT ( Modified, 2 ) )
RETURN
    DATE ( TheYear, TheMonth, TheDay )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2022 22:05:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-number-to-date-5-amp-6-digits-to-dd-mm-yyyy/m-p/2446898#M65713</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-04-08T22:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert number to date, 5 &amp; 6 digits to dd/mm/yyyy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-number-to-date-5-amp-6-digits-to-dd-mm-yyyy/m-p/2449994#M65899</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;, it works! Thanks you a lot, i accept it as solution&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 15:30:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-number-to-date-5-amp-6-digits-to-dd-mm-yyyy/m-p/2449994#M65899</guid>
      <dc:creator>feralvarez994</dc:creator>
      <dc:date>2022-04-11T15:30:07Z</dc:date>
    </item>
  </channel>
</rss>

