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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Get Hour (with AM/PM) from DateTime field

I have a timestamp field that I would like to pull the hour with AM and PM.  I have HOUR('Call Logging'[CALL_DATE]) but it displays millitary time.  Any help is appreciated.

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Do you want to extract Hour at each time and add AM/PM later?

If I understand correctly, please refer the followng measure,

 

Measure = 
HOUR(MAX(Dates[Cdate])) &" "& RIGHT(MAX(Dates[Cdate]),2)

 

Get1.jpg

 

If it doesn't meet your requirement, could you please show the exact expected result?

It will be helpful if you can show us the desire result based on fake data.

 

Best regards,

 

Community Support Team _ zhenbw

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

View solution in original post

4 REPLIES 4
v-zhenbw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Do you want to extract Hour at each time and add AM/PM later?

If I understand correctly, please refer the followng measure,

 

Measure = 
HOUR(MAX(Dates[Cdate])) &" "& RIGHT(MAX(Dates[Cdate]),2)

 

Get1.jpg

 

If it doesn't meet your requirement, could you please show the exact expected result?

It will be helpful if you can show us the desire result based on fake data.

 

Best regards,

 

Community Support Team _ zhenbw

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

amitchandak
Super User
Super User

@Anonymous , Not sure I got it. As long as any datetime is detected as date type you can change its format to the desired format using the format option

Data Format New Rib.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
mahoneypat
Microsoft Employee
Microsoft Employee

Instead of HOUR() you can use FORMAT('Call Logging'[CALL_DATE], "h AM/PM")

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

I'm using DQ as my data source.  

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors