Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Convert YYYYMMDDHHMMSS into DD.MM.YYYY

Hello there,  a field called "lastseen" contains a String which represents a date in the format YYYYMMDDHHMMSS. For example 20230516075823.  How can I convert it to DD.MM.YYYY?   I treid the fo...
  • BiNavPete's avatar
    3 years ago

    Hi Anonymous 

    See attached PBIX here.

    In Powerquery take the left 8 characters by adding a custom column using Text.Start
    Table.AddColumn(Source, "Custom", each Text.Start([StringDate],8))

    Then use Date.FromText on that column
    Table.AddColumn(#"Added Custom", "Date", each Date.FromText([Custom]))

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Happy to help!!

    Pete
    Web: https://binavigation.com
    Linked In: https://www.linkedin.com/in/pete-smith-955b73181