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 September 15. Request your voucher.
Hi all ,
I have a column with STRING format values which needs to be changed into DATE format.
Eg: I want to convert string "200502" into DATE format as 2020,May,2nd.
Thanks in advance.
Regards.
Solved! Go to Solution.
What do you get if you use DATE function?
Using "200502" it would look like
DateColumn =
DATE("20" & LEFT('Table'[Date],2),
MID('Table'[Date],3,2),
RIGHT('Table'[Date],2)
)
Hi,
You could create a calculated column to extract the parts and then change it into a date.
Example:
DateColumn =
"20" & LEFT('Table'[Date],2) & "," &
MID('Table'[Date],3,2) & "," &
RIGHT('Table'[Date],2)
@Gordonlilj Thanks!
Tried that, it is throwing an error that Text cannot be converted into Date format.
Any other workaround?
What do you get if you use DATE function?
Using "200502" it would look like
DateColumn =
DATE("20" & LEFT('Table'[Date],2),
MID('Table'[Date],3,2),
RIGHT('Table'[Date],2)
)
User | Count |
---|---|
65 | |
62 | |
60 | |
53 | |
30 |
User | Count |
---|---|
181 | |
82 | |
67 | |
48 | |
44 |