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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
idage
Helper I
Helper I

DATE FROM TEXT STRING

Goodmorning community,

i need to solve a problem. I have a column containing for ex:

 

03-Jul-23 A

08-Nov-23*

03/11/2023

03/11/2023 A

03-Jul-23

and i need to extract date all in the same format.

Could you help me?

 

Thank you very much in advance.

 

1 ACCEPTED SOLUTION
Royel
Helper II
Helper II

Hi @idage , to do that load data and go to power query

Step 1: Extracted Text Before Delimiter

= Table.TransformColumns(#"Filtered Rows", {{"Date", each Text.BeforeDelimiter(_, " "), type text}})

Select Column -> Transform -> Extract -> Text Before Delimiter

Royel_1-1692956691256.png

 

Step 2: Replace Value (Replace * with space)

= Table.ReplaceValue(#"Extracted Text Before Delimiter","*","",Replacer.ReplaceText,{"Date"})

Select Column -> Transform -> Replace Values

Royel_2-1692956855582.png

 

Step 3: Change Data Type (Output) 

Royel_3-1692957059506.png

 

 

Regards
Royel

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Royel
Helper II
Helper II

Hi @idage , to do that load data and go to power query

Step 1: Extracted Text Before Delimiter

= Table.TransformColumns(#"Filtered Rows", {{"Date", each Text.BeforeDelimiter(_, " "), type text}})

Select Column -> Transform -> Extract -> Text Before Delimiter

Royel_1-1692956691256.png

 

Step 2: Replace Value (Replace * with space)

= Table.ReplaceValue(#"Extracted Text Before Delimiter","*","",Replacer.ReplaceText,{"Date"})

Select Column -> Transform -> Replace Values

Royel_2-1692956855582.png

 

Step 3: Change Data Type (Output) 

Royel_3-1692957059506.png

 

 

Regards
Royel

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors
Top Kudoed Authors