<?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 exctracting from specific timestamp in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729587#M1689</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would do something like this:&lt;/P&gt;
&lt;PRE&gt;DATE(
    VALUE(&amp;lt; something that returns the year &amp;gt;)
    ,VALUE(&amp;lt; something that returns the month &amp;gt;)
    ,VALUE(&amp;lt; something that returns the day &amp;gt;)
)&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2019 11:18:55 GMT</pubDate>
    <dc:creator>TomMartens</dc:creator>
    <dc:date>2019-07-02T11:18:55Z</dc:date>
    <item>
      <title>Date exctracting from specific timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729570#M1687</link>
      <description>&lt;P&gt;Hi community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you please give me advice what is the best way to extract the date from this specific timespamp:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;P2019Y3M11DT11H4M54S&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to use MID function to exctract the parts and concatenate them by ".":&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Date =&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MID ( Test_table[orderDate] ; SEARCH ( "M" ; Test_table[orderDate] ) + 1 ; SEARCH ( "D" ; Test_table[orderDate] ) - SEARCH ( "M" ; Test_table[orderDate] ) - 1 ) &amp;amp; "." &amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MID ( Test_table[orderDate] ; SEARCH ( "Y" ; Test_table[orderDate] ) + 1 ; SEARCH ( "M" ; Test_table[orderDate] ) - SEARCH ( "Y" ; Test_table[orderDate] ) - 1 ) &amp;amp; "." &amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MID ( Test_table[orderDate] ; SEARCH ( "P" ; Test_table[orderDate] ) + 1 ; 4 )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;As result I received a text string "11.3.2019", but not able to change the format to Date.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Would be really appreciate for your help.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you!&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Jul 2019 10:55:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729570#M1687</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-02T10:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date exctracting from specific timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729586#M1688</link>
      <description>&lt;P&gt;Hi Egor,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test:=date(mid("P2019Y3M11DT11H4M54S",find("P","P2019Y3M11DT11H4M54S")+1,4),mid("P2019Y3M11DT11H4M54S",find("M","P2019Y3M11DT11H4M54S")+1,2),mid("P2019Y3M11DT11H4M54S",find("Y","P2019Y3M11DT11H4M54S")+1,1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Probably not the best way, but this works.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 11:17:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729586#M1688</guid>
      <dc:creator>AliH</dc:creator>
      <dc:date>2019-07-02T11:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date exctracting from specific timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729587#M1689</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would do something like this:&lt;/P&gt;
&lt;PRE&gt;DATE(
    VALUE(&amp;lt; something that returns the year &amp;gt;)
    ,VALUE(&amp;lt; something that returns the month &amp;gt;)
    ,VALUE(&amp;lt; something that returns the day &amp;gt;)
)&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Tom&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 11:18:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729587#M1689</guid>
      <dc:creator>TomMartens</dc:creator>
      <dc:date>2019-07-02T11:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date exctracting from specific timestamp</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729636#M1696</link>
      <description>&lt;P&gt;Thank you guys, now it works!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 12:13:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-exctracting-from-specific-timestamp/m-p/729636#M1696</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-02T12:13:36Z</dc:date>
    </item>
  </channel>
</rss>

