The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Is it possible to convert a column in Power BI that contains a C# Date tick value to a DateTime?
Solved! Go to Solution.
I am sure you could do it in Power Query.
Read this. http://stackoverflow.com/questions/1489243/how-can-i-convert-ticks-to-a-date-format
in Power Query, add a new column and then use the formula, above to convert the date tick to a serial number
I think you can then convert the number to a date with the UI (although I have never tried it). Worst case you should be able to use a power query date fipunction to convert it.
Thanks Matt. I suspected this was the direction I needed to go in, just wanted to be sure I hadn't missed something obvious.
Try the following conversion
=DateTime.FromFileTime([ticks])-#duration(584388,0,0,0)
The FromFileTime counts the ticks from 1600/01/01 so that's why we have the duration of 584388 days to offset this.
I am sure you could do it in Power Query.
Read this. http://stackoverflow.com/questions/1489243/how-can-i-convert-ticks-to-a-date-format
in Power Query, add a new column and then use the formula, above to convert the date tick to a serial number
I think you can then convert the number to a date with the UI (although I have never tried it). Worst case you should be able to use a power query date fipunction to convert it.
Thanks Matt. I suspected this was the direction I needed to go in, just wanted to be sure I hadn't missed something obvious.
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
182 | |
81 | |
64 | |
46 | |
41 |