Forum Discussion
Text won't turn to Date
- Anonymous6 years ago
I figured it out. I had to create an If statement to get rid of the 0s. Then I created another column with the following equation:
Column 2 = Date(LEFT(BOOJ30MF[Requested date],4),MID(BOOJ30MF[Requested date],5,2) ,RIGHT(BOOJ30MF[Requested date],2))
Hi Anonymous
That type of information will not give you a date format you need to do the following:
Date = LEFT(BOOJ30MF[MMDD],2) &"/&RIGHT(BOOJ30MF[MMDD],2) & "/" & LEFT(BOOJ30MF[BOOJRSDT],4)
And then format the column as a date column.
@ MFelix - I am getting the error "Cannot convert value "0/0/0" of type Text to type Date
- Anand246 years ago
Super User
Hi Anonymous ,
Power BI doesn't recognise MMDDYYYY directly as a Date format. That's why you are not able to directly convert into date field.
Same is the issue when you use FORMAT function
Create a calculated column by splitting and joining existing column to have data in the format of a date(MM/DD/YYYY or DD/MM/YYYY or any other Date format).
Probably this new column will be of text data type but in Power BI recognizable date format, hence you will just need to convert this date data type.
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
- Anonymous6 years agoNot applicable