cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
huguestremblay
Helper I
Helper I

Date/Time field - Display format

Hello,

I have a date/time field in my report.   Depending on the visual and the user, I sometimes need to show only the date and sometimes the date and time.  Is there a way of changing the format of a date/time field in a specific visual or if I have to have 2 separate fields available in the report (one with date and time and the other with just the date)?  

Thanks!

2 REPLIES 2
RicoZhou
Community Support
Community Support

Hi @huguestremblay ,

 

As far as I know, we can use format function to create measure/calculated column to format your date/time column. I think we always add date/time column into visual as a key column to expand the visual like Axis field. Due to Power BI doesn't support us to add measures into Axis field, measure is not suitable for us. 

 

However format function will not convert the data in data model. So thought we format a date/time data to date only, it will still work like date/time format in data model.

 

So I suggest you to create a new calcualted column by DATEVALUE() function to convert date/time value to date only value. So you can choose the column to create your visuals by the date format you want.

RicoZhou_0-1655949039937.png

Result is as below.

RicoZhou_1-1655949065386.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hello Rico,

Thank you for your answer.  I am aware that I can create multiple fileds with different date/time formats in my dataset but what I am looking for is a method that dosen't require an additional field for each date format that a user might want (e.g. date/time or mm/dd/yyyy or dd-MMM-yyyy, or other).

Hugues.

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.