Forum Discussion
Datetime column in SQL Server not displayed the same type in Power BI
- 5 years ago
Hi ahmed_MEJRI ,
In query editor, select both of these columns, right click and MERGE.
This will merge both of these columns.
Then click on the merged column and chnage it's datatype to datetime format from the top ribbon under TRANSFORM.
Consider following example:
Select both of your columns Date and Time:
Right click and select MERGE as highlighted above.
A window appears, enter the following values:
Once you hit OK, you get the following:
Select your merged column - DateTime Value
Then click on Transform on top ribbon and modify datatype to DATETIME as shown below:
You get your merged Datetime column as shown:
Hope this helps.
Thanks,
Pragati
Hi Experts,
in my model i have two columns called : Date and Heure (it's hour in french)
can we create a calculated column with DAX to make concat for the 2 columns Date and Heure to have the completed datetime and we call this column DatetimeFX for example ?
Best Regards
Hi ahmed_MEJRI ,
In query editor, select both of these columns, right click and MERGE.
This will merge both of these columns.
Then click on the merged column and chnage it's datatype to datetime format from the top ribbon under TRANSFORM.
Consider following example:
Select both of your columns Date and Time:
Right click and select MERGE as highlighted above.
A window appears, enter the following values:
Once you hit OK, you get the following:
Select your merged column - DateTime Value
Then click on Transform on top ribbon and modify datatype to DATETIME as shown below:
You get your merged Datetime column as shown:
Hope this helps.
Thanks,
Pragati