Forum Discussion
Ania
8 years agoNew Member
Power BI
Hi, In my model I got column "Date" with two types of dates: "day-month-year" and "month/day/year". What would be the formula to unify the date format? I know how do do that in SQL ( IF(`date` RLI...
- 8 years ago
You can use the DATE function for that, together with MID.
MyDateColumn = date("2018", "4", "17") this returns a data value.
Fill in the Year, Month and Day by doing a MID function on your string values.
e.g. MyYear = MID("25/04/2018",7,4) this returns 2018.
waltheed
Impactful Individual
8 years agoYou can use the DATE function for that, together with MID.
MyDateColumn = date("2018", "4", "17") this returns a data value.
Fill in the Year, Month and Day by doing a MID function on your string values.
e.g. MyYear = MID("25/04/2018",7,4) this returns 2018.