+ Reply to Thread
Results 1 to 7 of 7

Power Query transformation of unrecognizable date/time format in column with various input

  1. #1
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Power Query transformation of unrecognizable date/time format in column with various input

    Hi,

    I am working on transforming imported data in Power Query and have a column in the table which contains various alphanumeric results. Some of these results are date/time info in the following text format: hh:mm:ss (dd-MMM-yyyy), e.g. 07:10:00 (01-JUL-2019).

    I am looking for a way to transform these date/time values into a format which is recognized as date/time by Excel, preferably dd.mm.yyyy hh:mm:ss, e.g 01.07.2019 07:10:00, without affecting the other non-date/time data in the column.

    Any suggestions?

    Best regards,
    Marbleking

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Power Query transformation of unrecognizable date/time format in column with various i

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Power Query transformation of unrecognizable date/time format in column with various i

    Hi,

    Please see attached example file.

    Regards,
    Marbleking
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,292

    Re: Power Query transformation of unrecognizable date/time format in column with various i

    Combination of PQ and function If
    Attached Files Attached Files
    Last edited by Czeslaw; 10-20-2021 at 08:22 AM.

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Power Query transformation of unrecognizable date/time format in column with various i

    Try this:=IFERROR(DATEVALUE(MID(Table1_2[@Result],11,11))+TIMEVALUE(LEFT(Table1_2[@Result],9)),Table1_2[@Result])

  6. #6
    Forum Contributor
    Join Date
    04-15-2013
    Location
    Singapore, Melbourne
    MS-Off Ver
    Office 365
    Posts
    167

    Re: Power Query transformation of unrecognizable date/time format in column with various i

    try the below code in PQ:

    Please Login or Register  to view this content.
    Row row row your boat
    Gently down the stream

  7. #7
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Power Query transformation of unrecognizable date/time format in column with various i

    Thanks a lot for these solutions. I'll be working on integrating them into the rest of my data. Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to add date/time to Power Query
    By wnt9080 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-23-2021, 03:02 AM
  2. Power Query: Simple Table Transformation
    By andrewc in forum Excel General
    Replies: 1
    Last Post: 09-24-2020, 06:12 AM
  3. [SOLVED] power query date format
    By orhanceliloglu in forum Excel General
    Replies: 3
    Last Post: 06-18-2018, 08:08 AM
  4. [SOLVED] Power Query Date Transformation
    By Moggzzz in forum Excel General
    Replies: 2
    Last Post: 03-21-2018, 02:47 PM
  5. Data transformation using Formula or Power Query
    By chullan88 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-18-2017, 09:59 AM
  6. Power Query Date Time
    By jcmckeon in forum Excel General
    Replies: 5
    Last Post: 09-12-2017, 02:19 PM
  7. Power Query convert Unix time to a date
    By logisteve in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2015, 06:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1