cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlessandroP
Helper I
Helper I

How to convert string HH:MM in integer

Dear Experts

 

I have a csv file that provides a column called Time  in format HH:MM.

 

I need to feed the values of this column in a data connector and it accepts only INT32 data type.

 

How do I convert then from HH:MM into INT32 in Power Automate?

 

Any help would be highly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
jinivthakkar
Memorable Member
Memorable Member

@AlessandroP in continuation of yesterdays flow I have add following steps which gives me int value for HH and MM separately then you can use as required

 

jinivthakkar_0-1613390890328.png

 

Entire flow 

jinivthakkar_1-1613391028583.png

 

Refer this link for details of the flow : https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-convert-string-dd-mm-yyyy-hh-mm-to...

 

Hope this helps.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

5 REPLIES 5
jinivthakkar
Memorable Member
Memorable Member

@AlessandroP in continuation of yesterdays flow I have add following steps which gives me int value for HH and MM separately then you can use as required

 

jinivthakkar_0-1613390890328.png

 

Entire flow 

jinivthakkar_1-1613391028583.png

 

Refer this link for details of the flow : https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-convert-string-dd-mm-yyyy-hh-mm-to...

 

Hope this helps.

 

--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Paulie78
Super User III
Super User III

2021-02-15_12-21-52.png

AlessandroP
Helper I
Helper I

I don't think this is going to solve my issue 

 

I need to convert for example the time 23:32 into an integer.

I don't need to convert into integer 23 and 32.

I need the formula to convert the time into an integer.

AlessandroP
Helper I
Helper I

Now, I get it

 

essentially the field time is expressed in seconds therefore I need to calculate the number of seconds from the time expressed in hours and minutes.

Thanks to the splitting you suggested ,  I can bulid the formula  Number of hours * 3600 + number of minutes * 60

 

 

AlessandroP_0-1613432370767.png

 

Thank you for the help

 

AlessandroP
Helper I
Helper I

This is the formula I used 

add(mul(int(outputs('Split_Hours_and_minutes')[0]),3600),mul(int(outputs('Split_Hours_and_minutes')[1]),60))

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

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

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (35,185)