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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
getlean4life
New Member

Excel Power Query - how to truncate data that is returned date time to just date

Hi - fairly new to using Power Query within Excel ... I am querying a web-based source and it is returning a date_added field with the date and time information ... I only want/need the date info and would like to truncate off the time ... pointers are appreciated - here is an example:

Table.ExpandRecordColumn(#"Converted to Table", "Value", {"name", "date_added"

it returns the following under the Value.date_added column:

2021-02-02T00:00:00.000Z

how do I truncate off the T00:00:00.000Z portion ?

 

Thanks!

2 ACCEPTED SOLUTIONS
ImkeF
Super User
Super User

In the Transform-Tab, you'll find some options in the "Date"-section that allow to extract just the date.

If that doesn't work, you can retrieve everything before the "T" with a text-extraction-function:

ImkeF_0-1622354867139.png

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

Thank you - that got me on the right track ... I was able to truncate off the time by going to the Transform-Tab, selecting Date, and then choosing Date Only ... greatly appreciate the assist!

View solution in original post

2 REPLIES 2
ImkeF
Super User
Super User

In the Transform-Tab, you'll find some options in the "Date"-section that allow to extract just the date.

If that doesn't work, you can retrieve everything before the "T" with a text-extraction-function:

ImkeF_0-1622354867139.png

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Thank you - that got me on the right track ... I was able to truncate off the time by going to the Transform-Tab, selecting Date, and then choosing Date Only ... greatly appreciate the assist!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors
Top Kudoed Authors