Forum Discussion

mj2024's avatar
mj2024
Helper II
1 year ago
Solved

Reformat datetime to only date

Hi everyone

I have a table coming from sql server that is a datetime.  In PowerBI I only want date not time.  How do I fix this?  The data is being displayed in a PowerBI table:

Thank you

9 Replies

  • Hi mj2024 - Go to Data View in Power BI.

    Select the table containing your datetime column.

    Click on the column with datetime values (e.g., YourColumnName).

    In the Column Tools tab, locate the Format dropdown.

    Choose the Date format (e.g., dd/mm/yyyy or yyyy-mm-dd).

    This will display only the date part while keeping the underlying datetime data.

     

     

     

    or option 2:

    If you prefer to fix this at the query level:

    1. Go to Home > Transform Data to open Power Query Editor.

    2. Select the column with the datetime values.

    3. Go to the Transform tab.

    4. Click on Date > Date Only.

    5. Close and Apply changes to Power BI.

      This will transform the column to a date-only format in the Power Query Editor.

  • v-achippa's avatar
    v-achippa
    Community Support

    Hi mj2024,

    Thank you for reaching out to Microsoft Fabric Community.

     

    Below is the simple approach to change from date and time to only date in Power BI

    1. Open the Report page and from the Home ribbon select Transform data
    2. A new Power Query Editor window will open
    3. Now for the required column, beside column name there is data type, click on the data type and from there select the Date data type. It will display only the date but not the time.
       

    Before:

    After:

     

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

     

    Thank and Regards,

    Anjan Kumar Chippa

    • v-achippa's avatar
      v-achippa
      Community Support

      Hi mj2024,

      As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance?

      If my response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

       

      Thank you for being a part of the Microsoft Fabric Community Forum!

       

      Thanks and Regards,

      Anjan Kumar Chippa

      • v-achippa's avatar
        v-achippa
        Community Support

        Hi mj2024,

         

        We wanted to kindly follow up to check if the solution I have provided for the issue worked? If the issue is resolved, please mark the solution as Accept as solution to help the other members of the community find it more quickly. or let us know if you need any further assistance?

        Don't forget to give a "Kudos" – I’d truly appreciate it! 

         

        Thank you for being a part of the Microsoft Fabric Community Forum!

         

        Thanks and Regards,

        Anjan Kumar Chippa

  • Hi mj2024 ,

    In your table view, select the desired column and change the data type to date:

     

  • In your table view, select the desired column and change the data type to date:

     

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!

     

  • You can also try another option using the sql query 

     

    SELECT CAST('Datetime column' AS Date) AS ConvertedDate from Tablename

    • skparavind_1994's avatar
      skparavind_1994
      Frequent Visitor

      mj2024 Have you tried this solution.

      If you found this answer helpful:

       

       Mark it as the solution to help others find it faster.

      • mj2024's avatar
        mj2024
        Helper II

        Thank you everyone.

        I am getting an error when I try to change the type:

         

        I do not want to import the data because that is going to make my PowerBI file too big.  I prefer the query approach.

        I changed the source sql query to say yet PowerBI keeps on adding the time:

        CAST(EARNINGS_DATE AS date) AS EARNINGS_DATE

        Any ideas on how to fix this?

        Thank you