cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
matihernandez94
Frequent Visitor

set hours

hi everyone, 

 

i need to set the hours of dates, for example if the day is 21/05/2021 05:35:20 i want change to 21/05/2021 10:00:00. And that for a lot of dates, always with the 10:00:00.

 

Hola a todos necesito cambiar el horario de las fechas en mis bases de datos, en las cuales si no estan dentro del horario laboral que es de (10:00:00 a17:00:00) cambie la hora a las 10:00:00. Ya que nose como modificar este campo.

 

Por ejemplo si es 21/05/2021 05:35:20 quiero cambiar ese campo al siguiente 21/05/2021 10:00:00.

 

 

1 ACCEPTED SOLUTION
Fowmy
Super User IV
Super User IV

@matihernandez94 

Add the following calculated column to your table

 

New Date and Time = INT(Table[Date]) + TIME(10,0,0)

 

 

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

Proud to be a Super User!

Website   YouTube    LinkedIn   Join my Power BI User

View solution in original post

4 REPLIES 4
matihernandez94
Frequent Visitor

thanks , 

but in the editor of power query the funcion "int"  is not available

matihernandez94_0-1621638557365.png

 

matihernandez94_2-1621638751582.png

 

 

how i can do that ? 😞 

@matihernandez94 

I thought you wanted a solution as a Calculated Column in the model. No issue, Please use the add custom column in Power Query and use the following code.

Fowmy_0-1621651168450.png

 



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

Proud to be a Super User!

Website   YouTube    LinkedIn   Join my Power BI User

Fowmy
Super User IV
Super User IV

@matihernandez94 

Add the following calculated column to your table

 

New Date and Time = INT(Table[Date]) + TIME(10,0,0)

 

 

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

Proud to be a Super User!

Website   YouTube    LinkedIn   Join my Power BI User

View solution in original post

Thanks bro !

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors