Forum Discussion
Date Format Conversion
Hi guys,
I have dates in the format of dd-mmm-yy(01-Apr-17), is it possible to convert it to dd-mmm-yyyy(01-Apr-2017) ?
Thanks
Ajin
9 Replies
- PattemManoharCommunity Champion
You can use "Add Column from Examples" option to enter the format you require in one or two records. It will detect automatically the required expected format and will populate for all other rows as well. Then replace the old column with new column.
- AnonymousNot applicable
That's cleaner than my solution since you can delete the old column.
- ajinHelper II
Pat,
This approach is useful, but since my data is large is there a way to do this without adding a new column and changing the existing column( such as how we change the format through modelling)as this might cause performance issues. Plus since this is a date field i would prefer it to remain the same as there are dependencies based on this column.
Thanks
Aj
- v-danhe-msftMicrosoft Employee
Hi ajin,
Based on my research, I am afraid you could not achieve this feature currently, I suggest you submit an idea in Ideas forum. You may submit a feature request on idea.
https://ideas.powerbi.com/forums/265200-power-bi-ideas
Regards,
Daniel He
- AnonymousNot applicable
Use a DAX formula to create a new column:
FORMAT('date'[Date],"dd-mmm-yyyy")
- v-danhe-msftMicrosoft Employee
Hi ajin,
You could refer to below link:
https://msdn.microsoft.com/en-us/query-bi/dax/format-function-dax
https://msdn.microsoft.com/query-bi/dax/custom-date-and-time-formats-for-the-format-function
Regards,
Daniel He
- ajinHelper II
Hi Guys,
Both the methods mentioned here involves adding a new column. The reports that I'm working with have huge data, hence I think adding new columns for all date fields might cause performance issues , therefore is there any alternative method of directly changing the column format without adding a new column ?
- v-danhe-msftMicrosoft Employee
Hi ajin,
Based on my research, I am afraid you could not modify the row data in Power BI, I still suggest you to use the Format function to achieve your result.
Regards,
Daniel He