Forum Discussion

Dora's avatar
Dora
Helper I
8 years ago
Solved

Making the Time in to same format

Dear All   I need to make below showing all the transaction time values in to 12 hours format.     I used following code but it gives me errors try Text.From([Transaction Time]) otherwis...
  • Dora's avatar
    Dora
    8 years ago

    Hi,

    Thank You

    But I am getting errors as follows:

  • Dora's avatar
    Dora
    8 years ago

    so I try to change the transaction time from following code

     

    if Text.Length([Transaction Time])>6 then [Transaction Time]

    else

    Text.Middle(Text.From([Transaction Time]),0,2) & ":" &

    Text.Middle(Text.From([Transaction Time]),2,2) &":" &

    Text.Middle(Text.From([Transaction Time]),4,2)

     

    but It didn`t give the required output.

     

  • v-xjiin-msft's avatar
    v-xjiin-msft
    8 years ago

    Hi Dora,

     

    It seems like that there exists some special formats. Like7597, it should be 075907. Right?

     

    For this scenario, my solution will not work. And if there are not many errors. I would suggest you to change the initial Time to the required format manually at Excel file side. I think it will be the easiest method.

     

    Thanks,
    Xi Jin.