Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213916

Converting from Text to Date

$
0
0

Hi

all,

 

How can I extract out from a date field the month and year arguments and create a new coloum with the format:

 

mm\yyyyy

 

I have an original date column ("minnipuk") holding the data in a dd/mm/yyyy format.

 

29/09/2015

 

what I need is - 9-2015 or even better sep-2015.

 

I did a new measure: in the query editor 

                                                               Text.From(Date.Month([minnpk]))
                                                                &"-"
                                                                &Text.From(Date.Year([minnpk]))

 

 

but when I used it in an x axis inside a graph the data is not sorted correctly (9-2016 comes after 10-2016  ), and  I think I understand why:It's a text not a date.

 

Is it possible to make the new column I have created a date type?

Should It be done in the query editor or inside the report itself?

 

Thanks

Erez 

 

 

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 213916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>