Converting Date of Type: Text to Date but not changing to Import Mode

SachinC

New Member
Joined
Sep 25, 2017
Messages
26
My report uses Direct Query connecting to a MS SQL Server.

My datevalue is in the format: 2019-12-30T00:00:00

My datevalue is of type: Text

I want to convert this to type: Date.

When I do this; it comes up with: "This step results in a query that is not supported in DirectQuery mode." Button: 'Switch all tables to Import mode'

I do not want to make this Import Mode or Mixed Mode (Import Mode and Direct Query). I want to remain in Direct Query mode.

Please help.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
As you already discovered, lots of transformations and functionalities are not supported in Direct Query mode. If your query was converted to an Import Mode, you could easily split the column by "T" delimiter in order to retrieve the Date.
Some date columns can still be transformed while in Direct Query mode, like "2019-12 30 00:00:00", but in your case "T" delimiter is the culprit.

I suspect that the easiest solution would be to take a step back and transform the date on SQL query level. In order to adjust your SQL statement, you can go to Power Query Editor > Applied Steps > Source > press the "cog" icon > SQL statement:

1584097470429.png
 
Upvote 0
Ahh I didn't post any SQL statement, sorry for the confusion :-) I am just showing where you can adjust your existing SQL statement. If you need any help with adjusting it, paste it here and I'll try to convert your Date column into a proper format.
 
Upvote 0

Forum statistics

Threads
1,223,798
Messages
6,174,667
Members
452,576
Latest member
AlexG_UK

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top