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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
MKM
Helper II
Helper II

how to get hour in date & time field

Hi Team,

i have connected semantic model to power bi Desktop and the now requirement is when the date & time have ,,, i need only hour in that how i can get that.

Date
01-08-2024 10:16
01-08-2024 11:50
01-08-2024 14:43
01-08-2024 17:00
01-08-2024 11:30

 

I would expect to see 10, 11 for second row, 14 for the thirid  17 for the fourth and 11 for the fifth .

 

Please check and share any way we can achive on above concern.

 

Thanks,

 

2 ACCEPTED SOLUTIONS
SachinNandanwar
Solution Specialist
Solution Specialist

HOUR('Table'[Date])


Regards,
Sachin
Check out my Blog

View solution in original post

shafiz_p
Resident Rockstar
Resident Rockstar

Hi @MKM  As I can understand, that you want only hour in the same date and time column. If this, you just need to change format. See image below (Just type hh in the format section):

shafiz_p_0-1730538305967.png

Hit enter and you will get your desired format:

shafiz_p_1-1730538379131.png

 

If want to create a new column then use Hour function as @SachinNandanwar  mentioned.

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

View solution in original post

2 REPLIES 2
shafiz_p
Resident Rockstar
Resident Rockstar

Hi @MKM  As I can understand, that you want only hour in the same date and time column. If this, you just need to change format. See image below (Just type hh in the format section):

shafiz_p_0-1730538305967.png

Hit enter and you will get your desired format:

shafiz_p_1-1730538379131.png

 

If want to create a new column then use Hour function as @SachinNandanwar  mentioned.

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

Best Regards,
Shahariar Hafiz

SachinNandanwar
Solution Specialist
Solution Specialist

HOUR('Table'[Date])


Regards,
Sachin
Check out my Blog

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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