Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all.
How can I do this as blow :
use "20180731" to DATE????
"20180731" is stipe, but I want change to DATE time.
Thanks.
Solved! Go to Solution.
As a calculated column, you could use
Calculated Column = DATE ( LEFT ( Table1[Column], 4 ), MID ( Table1[Column], 5, 2 ), RIGHT ( Table1[Column], 2 ) )
Hi there, do you mean you want to take the txt and change it so that it is shown as a date?
If so, you can go into the Power Query Editor and change the column from text or number to date, and it should convert it for you automatically.
I think this is the best way but it must be a text, Power Query won't convert directly from number to date.
@Anonymous
It does convert automatically. Give it a try.
Prateek Raina
I have tried right now. This is the error:
DataFormat.Error: No se pudo convertir a Date. Detalles: 20050701
Using Adventure Works DW Database, Table FactInternetSales, Column OrderDateKey. If I convert from integer to Date I get the error, but I can do it in two steps: Integer -> Text -> Date
As a calculated column, you could use
Calculated Column = DATE ( LEFT ( Table1[Column], 4 ), MID ( Table1[Column], 5, 2 ), RIGHT ( Table1[Column], 2 ) )
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |