Forum Discussion
How to use DateTime.FromFileTime
- 6 years ago
I'm not sure if i completely understand what you're trying to achieve.
The filetime is a Windows file time value, you can read more about it here:File Times
Is it the date time when the excel file was created or when the data was changed? if so you could follow the steps in the post below
Show date last saved for excel file source
Hi,
DateTime.FromFileTime is not a DAX formula.
It's a M function used inside power query
Hi and thanks for the quick answer.
Does that mean that I can't use it within the query editor in Power BI?
Thanks
- Gordonlilj6 years agoSolution Sage
Power query and query editor is the same thing so you can use it inside the query editor.
You wrote DAX so i understood it as you were trying to use the function inside a measure or calculated column. When creating calculated columns or measures you use DAX while inside the power query editor you use M.
Using it inside the power query editor you would need a file time value such as 129876402529842245 that the page gives as an example
- Anonymous6 years agoNot applicable
Thanks again, where do I get that file time from?
Does this refer to the database I chose, in my example it is an excel file.
Thank you
- Gordonlilj6 years agoSolution Sage
I'm not sure if i completely understand what you're trying to achieve.
The filetime is a Windows file time value, you can read more about it here:File Times
Is it the date time when the excel file was created or when the data was changed? if so you could follow the steps in the post below
Show date last saved for excel file source