The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a column in a table as follows :
column Name is : Month
column Data Type is : text
What i need is to convert it to data type date and with the format of MMM (Only month name).
Can you help me please on this.
Thanks
Solved! Go to Solution.
So you only have the text, and no other column with a date to use?
This calculated columns would work
Month Name =
SWITCH(Table[Month],
"January", Format (Date(2020,1,1), “mmm”),
"February", Format (Date(2020,2,1), “mmm”),
//and so on for the rest of the months
)
You would have to adjust the year according to your need. If you are able though, it would be better if you could edit the data source so there are dates to work with. This solution is not very efficient.
So you only have the text, and no other column with a date to use?
This calculated columns would work
Month Name =
SWITCH(Table[Month],
"January", Format (Date(2020,1,1), “mmm”),
"February", Format (Date(2020,2,1), “mmm”),
//and so on for the rest of the months
)
You would have to adjust the year according to your need. If you are able though, it would be better if you could edit the data source so there are dates to work with. This solution is not very efficient.
This what i have and and it is a ( text ) data type , what i need is to convert this column to data type ( date ) and with the format of MMM (Only month name).
Should i create another culomn to convert it or what ?
Thanks
Yes, you will need to create a new calculated column that, based on the text in "Month", returns the date you want. And then you have to format that column.
Successfully completed... Thanks
User | Count |
---|---|
74 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |