Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ja342
Frequent Visitor

Change a text date to standard date

I have text date in query editor and want to convert to standard date, get error message when I try to convert using 'Data Type: Date/Time' and also when I use datefromtext function.

image.png

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

Create new columns like

startdate = mid(Table1[startdatetime],14,2) &"/"& mid(Table1[startdatetime],11,2) & "/" & right(Table1[startdatetime],4)
enddate = mid(Table1[enddatetime],14,2) &"/"& mid(Table1[enddatetime],11,2) & "/" & right(Table1[enddatetime],4)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

 

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, right click on each column individually and go to Split Column > By delimiter > comma.  Remove the column with the time stamp.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, right click on each column individually and go to Split Column > By delimiter > comma.  Remove the column with the time stamp.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Awesome thanks, both options worked, one for DAX and other for Query Editor.  cheers!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

Create new columns like

startdate = mid(Table1[startdatetime],14,2) &"/"& mid(Table1[startdatetime],11,2) & "/" & right(Table1[startdatetime],4)
enddate = mid(Table1[enddatetime],14,2) &"/"& mid(Table1[enddatetime],11,2) & "/" & right(Table1[enddatetime],4)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.