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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
igaca
Helper III
Helper III

Power Query: Text string to date conversion

How does one convert -for example- "September 16, 2019 8:00 AM" into "9/16/2019" without decomposing the text string into relevant constituent parts (months, days of month, year) then re-constituting and formatting?

 

Thanks for your input!

 

IG

1 ACCEPTED SOLUTION
gpoggi
Responsive Resident
Responsive Resident

Hi @igaca ,

 

Since the text has time inside, first conver it to DateTime and the extract the Date from this DateTime, for example if I you add this Custom Column:

 

Date.From(DateTime.From([Text Column]))

I'm extracting DateTime From text, and after that I'm extracting Date from this result in one line, this will return this:

table3.jpg

 

Any question, just let me know.

 

Regards,

 

Gian Carlo Poggi

View solution in original post

2 REPLIES 2
gpoggi
Responsive Resident
Responsive Resident

Hi @igaca ,

 

Since the text has time inside, first conver it to DateTime and the extract the Date from this DateTime, for example if I you add this Custom Column:

 

Date.From(DateTime.From([Text Column]))

I'm extracting DateTime From text, and after that I'm extracting Date from this result in one line, this will return this:

table3.jpg

 

Any question, just let me know.

 

Regards,

 

Gian Carlo Poggi

Thank you, sir.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors