Forum Discussion

MalvikaBhasin's avatar
MalvikaBhasin
Helper III
2 years ago

Text to Date

Hi,

 

Why am I unable to change TEXT to DATE for a column.

 

 

Regards

Malvika

 

9 Replies

    • MalvikaBhasin's avatar
      MalvikaBhasin
      Helper III

      Thanks. But why is it working partially for me? Can you help identify issue from below image?

       

       

      Regards

      Malvika

      • mostho's avatar
        mostho
        Helper II

        How does the column look like before the transformation? i guess the "dates" are in a format which the function cannot handle by default. maybe you have to adjust the function call with an optional culture parameter or a format specification.

    • MalvikaBhasin's avatar
      MalvikaBhasin
      Helper III

      Thanks. But why is it working partially for me? Can you help identify issue from below image?

       

       

      Regards

      Malvika

  • pls try this code in power query

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjTQNTDWNTIwtFCK1QFyDVG5RqhcYwQ3FgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t]),
        Custom1 = Table.TransformColumns( Source, {"Date",(x)=> Date.FromText(x,[Format="dd-MM-yyyy"])})
    in
        Custom1
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi All,

    Fisrtly, thanks to all for your kind replies!
    And MalvikaBhasin ,

    Has your problem been solved after all this time, or has a new problem arisen, if there are any other questions on this issue, feel free to contact me and I'll get back to you as soon as I receive the message.

    Hope it helps!

    Best regards,
    Community Support Team_ Tom Shen

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