Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Change date display format

 

Hi,

 

My Date is in format 01/09/2017 00:00:00 ie (DD/MM/YYYY hh:mm:ss) as below:

 

DataTime
01/09/2017 00:00:00
01/09/2017 00:30:00
01/09/2017 01:00:00
01/09/2017 01:30:00
01/09/2017 02:00:00
01/09/2017 02:30:00
 
 
 

 

 

but I want it to display like the below format:

 

Fri 01 02:30  ie (DDD DD hh:mm)

 

Expected Results:

DataTime
Fri 01 00:00
Fri 01 00:30
Fri 01 01:00
Fri 01 01:30
Fri 01 02:00
Fri 01 02:30

 

Please help

 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

 

Just add a column to your data with the following syntax:

 

Date_Time_Format = FORMAT('Date'[DataTime],"DDD DD hh:mm")

Date_format.png

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

You are going to have to create a new column that uses a combination of WEEKDAY, SWITCH, CONCATENATE and FORMAT functions.

 

Something like:

 

Column = var wday = WEEKDAY(Events[EventTime])
var wdayname = SWITCH(wday,1,"Sun ",2,"Mon ",3,"Tue ",4,"Wed ",5,"Thu ",6,"Fri ",7,"Sat ")
RETURN CONCATENATE(wdayname,FORMAT(Events[EventTime],"dd hh:mm"))

 

Update: The other solutions work as well although not documented here:

https://technet.microsoft.com/en-us/library/ee634398(v=sql.130).aspx

 

I would disagree that it is not possible to just change the display format, you can do that in the Modeling tab by having a data type of Date/Time and changing the Format via the dropdown. But, there is no choice for your particular format.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
TomMartens
Super User
Super User

Hey,

 

you can use this little DAX statement to create a calculated column

Column with Display Value = FORMAT('Table2'[DatetoFormat],"DDD DD hh:mm")

Please be aware, that creating a new column will have impact on filtering the rows of the table or all the related tables.

 

It's not possible to change just the "display" format

 

Hopefully this gets you started

 

Regards

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
MFelix
Super User
Super User

Hi @Anonymous,

 

Just add a column to your data with the following syntax:

 

Date_Time_Format = FORMAT('Date'[DataTime],"DDD DD hh:mm")

Date_format.png

 

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thank you all for your tremendous help.

Date_Time_Format = FORMAT('Date'[DataTime],"DDD DD hh:mm")…..This simply worked in this instance:

I truly appreciate all your contributions.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.