Forum Discussion

kaym's avatar
kaym
Icon for Helper I rankHelper I
2 years ago
Solved

HELP WITH Expression.Error: We couldn't parse the input provided as a Time value.

Hello,

I dont know why I am getting an error in my time column for only one of the rows.
This is how the column looks:

and this is the error:

Thank you for your help!

  • Hello kaym ,

     

    The time in this row is not recognized as time in power bi, so maybe there's something missing in it, it should be formatted as time value.

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi kaym 

     

    Idrissshatila  Thank you very much for sharing!

     

    The time data type in Power Query uses the 12-hour format by default. If you need to use the 24-hour format, you can change the regional settings of the time column in the Power Query editor and select a region that uses the 24-hour format, for example British English or Singaporean English.

     

    One possible reason for this error is that Power BI uses the 12-hour clock format by default, and it doesn’t recognize 24:00:00 as a valid time.

     

    To do this, you can right-click on the Time column in Power Query Editor, and select Change Type > Using Locale… Then, choose Time as the data type, and select the appropriate locale from the drop-down list. Press OK to apply the change.

     

    This should fix the error and convert the Time column to a valid time data type. You can also format the Time column to display the time in the way you prefer, such as hh:mm:ss or HH:mm:ss.

     

    Regards,

    Nono Chen

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

3 Replies

  • Hello kaym ,

     

    The time in this row is not recognized as time in power bi, so maybe there's something missing in it, it should be formatted as time value.

  • Hi, 

    Possibly you have different regional settings which are not the same as provided string for date format.

    I think you can try to parse as a string this value and later instead of directly changing type to Date/Time go to Using Locale and choose United States --> Date Time.

    I hope it helps.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi kaym 

     

    Idrissshatila  Thank you very much for sharing!

     

    The time data type in Power Query uses the 12-hour format by default. If you need to use the 24-hour format, you can change the regional settings of the time column in the Power Query editor and select a region that uses the 24-hour format, for example British English or Singaporean English.

     

    One possible reason for this error is that Power BI uses the 12-hour clock format by default, and it doesn’t recognize 24:00:00 as a valid time.

     

    To do this, you can right-click on the Time column in Power Query Editor, and select Change Type > Using Locale… Then, choose Time as the data type, and select the appropriate locale from the drop-down list. Press OK to apply the change.

     

    This should fix the error and convert the Time column to a valid time data type. You can also format the Time column to display the time in the way you prefer, such as hh:mm:ss or HH:mm:ss.

     

    Regards,

    Nono Chen

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