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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
harishuppala2
Frequent Visitor

How to Get Month and time from Datetime Field

Hi, 

Can anyone help me to achive this 

I am trying to get Month name and the time from datetime feild 

 

example : 

Datetime formate : 6/27/2019 11:00:00 AM 
Formate i am looking for  : Jan 27 11:00 AM
4 REPLIES 4
kentyler
Solution Sage
Solution Sage

I think if you use FORMAT() you can build a custom string however you want. Here's the link https://docs.microsoft.com/en-us/dax/custom-date-and-time-formats-for-the-format-function

 

I'm a personal Power Bi Trainer I learn something every time I answer a question

The Golden Rules for Power BI

  1. Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
  2. Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
  3. Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
  4. Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result  to check on your steps along the way.




Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


@kentyler  thanks for the Quick reply 

i got the result formated as i need but the result is in Text date type and when i change the type to datetime its converting back to the format 

can you suggest how to solve this.

 

dax i used : 

= FORMAT([roundedhour],"mmm d h:ss AM/PM")
 

In the data view, There are a few formats you can select.

Data Format.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

It is possible some ways of writing a date as text cannot be automatically converted back to being dates, you can refer to the original field to get the value as a date as long as its in the table, it does not have to be on the visual.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.