Forum Discussion

getlean4life's avatar
getlean4life
New Member
5 years ago
Solved

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!

  • 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:

     

  • 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!

2 Replies

  • ImkeF's avatar
    ImkeF
    Community Champion

    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:

     

    • getlean4life's avatar
      getlean4life
      New Member

      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!