Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6096185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:53:51+00:00 2026-05-23T12:53:51+00:00

Outputting from a directions api I have a duration it will take the user

  • 0

Outputting from a directions api I have a duration it will take the user to get from a to b. At the moment it is minutes but if the users journey will take 3 hours and 20 minutes it will output 200 minutes.

I would like it to work out that that is greater than 60 minutes. then divide by 60 and add the remainder to give

3 hours 20 minutes.

How do we do this.

Marvellous

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:53:51+00:00Added an answer on May 23, 2026 at 12:53 pm
    $minutes = 200;
    if ($minutes >= 60)
    {
      $hours = (int)($minutes / 60);
      $minutes = $minutes % 60;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When outputting images from Photoshop that are over 31 characters I get a compatibility
I am outputting RTF from a word processor component. This is working well, but
Technically it should iterate from 0 to rangeLength outputting the user name of the
Alright, so I have a table outputting data from a MySQL table in a
I have an NSTextView that I'm outputting text from NSTask. Everything works as expected
I'm outputting comments on a /books/1 I have the following: <%= comment.user.id%> ---- This
I have a while loop getting info from a MySQL db, outputting info via
I have a JSF page which is outputting XHTML (from a facelet). One of
I'm outputting values from a database (it isn't really open to public entry, but
I am using http://java.sun.com/jsp/jstl/fmt tag library for outputting messages from Message Resource Bundle which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.