I have an Excel 2016 file with several tables that I have joined together using Power Query. The tables have some date fields that are populated as text (e.g. "1022018" = Jan 2, 2018) and I need to convert them to dates. I added a column for each that converts the data just fine but every time I refresh my query, the new columns disappear.
I opened Power Query and tried adding a custom column but the formula I created in Excel does not work and it needs to be written in M. I haven't had any luck finding an easy conversion to M or another way to create the columns using the Excel formula.
Any ideas how to accomplish this?
FYI here is formula: =IF(LEN([@DOBstring])=7,DATE(RIGHT([@DOBstring],4),LEFT([@DOBstring],1),MID([@DOBstring],2,2)),DATE(RIGHT([@DOBstring],4),LEFT([@DOBstring],2),MID([@DOBstring],3,2)))