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
evester
Helper II
Helper II

How do I convert military hour to standard Central time hour

I extracted the hour from my date field, however, the hour shows as military time.  I am having trouble using the FORMAT to format for standard time.   This is my new column. 
Hour = HOUR([p_datetime]

This is my table.  I would like for the hour to show 6 for 18, etc.  

evester_0-1687817132944.png

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

You could try it like this.

Hour = FORMAT('Table'[p_datetime],"h AM/PM")

 

View solution in original post

3 REPLIES 3
WernonDonski
New Member

As an avid military enthusiast, I found the article https://www.agmglobalvision.com/the_best_military_hardware_of_the_us_army incredibly insightful. The technological advances demonstrated by the US military undoubtedly have significant implications for global security and stability. As we examine the latest equipment and capabilities of the U.S. military, it is clear that maintaining a strong defense posture is critical in today's complex geopolitical landscape. However, while the US Army's superiority in military technology is undeniable, it is important to recognize the importance of diplomacy and international cooperation in maintaining peace and promoting dialogue among nations.

VahidDM
Super User
Super User

Hi   

Check these posts:
https://community.fabric.microsoft.com/t5/Desktop/Seperate-Time-from-Date/m-p/308981

 

https://community.fabric.microsoft.com/t5/Desktop/Get-Time-from-DateTime-field/td-p/2572372

 

Or use TIME function: https://learn.microsoft.com/en-us/dax/time-function-dax

 

TIME(HOUR([p_datetime]),MINUTE([p_datetime]),SECOND([p_datetime]))

 

 

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

Appreciate your Kudos!! 

Badges.jpg

@evester

jdbuchanan71
Super User
Super User

You could try it like this.

Hour = FORMAT('Table'[p_datetime],"h AM/PM")

 

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.