Forum Discussion
TimberlyneJohn
1 year agoFrequent Visitor
Power Query not recognizing data type datetime
Even though the column is type datetime Power Query does not recognize it as such. Any ideas on how to fix this? Yes, I can import the table if I don't try to filter the CreateDate column. let So...
- 1 year ago
You are trying to filter a datetime column with a date. That is the cause of the error. Wrap the filter criteria in a DateTime.From() to fix this.
#"Filtered Rows" = Table.SelectRows(#"Changed Type",
each [CreatedDate] >= DateTime.From(Date.StartOfYear(Date.AddYears(Date.From(DateTime.LocalNow()),-1))
))
TimberlyneJohn
1 year agoFrequent Visitor
Too easy. Thank you.