Hi All,
I required to transform the Date/Time format from raw data shown as Text: "20-Mar-16 1137" to "3/16/2020 11:37", tried to use M language as below but found failed with error message "The Date value must contain the Date component. Details: Mar".
My setting as below and how can I fix its. Thanks.
= Table.AddColumn(#"Removed Columns", "In Time", each DateTime.FromText(
Date.Year (Text.Combine({"21", Text.Middle([Unit Time In], 0,2)}),
Date.Month (Text.Middle([Unit Time In], 3, 3)),
Date.Day (Text.Middle([Unit Time In], 7, 2)),
Time.Hour (Text.Middle([Unit Time In], 10, 2)),
Time.Minute (Text.Middle([Unit Time In], 12, 2)))))
I required to transform the Date/Time format from raw data shown as Text: "20-Mar-16 1137" to "3/16/2020 11:37", tried to use M language as below but found failed with error message "The Date value must contain the Date component. Details: Mar".
My setting as below and how can I fix its. Thanks.
= Table.AddColumn(#"Removed Columns", "In Time", each DateTime.FromText(
Date.Year (Text.Combine({"21", Text.Middle([Unit Time In], 0,2)}),
Date.Month (Text.Middle([Unit Time In], 3, 3)),
Date.Day (Text.Middle([Unit Time In], 7, 2)),
Time.Hour (Text.Middle([Unit Time In], 10, 2)),
Time.Minute (Text.Middle([Unit Time In], 12, 2)))))