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

  • Home
  • SEARCH
  • 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 517497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:50:24+00:00 2026-05-13T07:50:24+00:00

For Example: StartTime = ’00:10′; EndTIme = ’01:20′; These variables are string Question: How

  • 0

For Example:

StartTime = '00:10';
EndTIme = '01:20';

These variables are string

Question: How can I Subtract them and returning the span time in minutes?

Hope you can help

  • 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-13T07:50:25+00:00Added an answer on May 13, 2026 at 7:50 am

    Make a function to parse a string like that into minutes:

    function parseTime(s) {
       var c = s.split(':');
       return parseInt(c[0]) * 60 + parseInt(c[1]);
    }
    

    Now you can parse the strings and just subtract:

    var minutes = parseTime(EndTIme) - parseTime(StartTime);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is an example XML (case 1) : <root> <Item> <ItemID>4504216603</ItemID> <ListingDetails> <StartTime>10:00:10.000Z</StartTime> <EndTime>10:00:30.000Z</EndTime>
Table example: TableName:DownTime Columns: EventID - int, ReasonID - int, StartTime - DateTime, EndTime
I have these fields in my T-SQL database - startTime and endTime and processTime
Example: an Employee table with an optional DateOfBirth field can be normalized into two
Example CSS #wrap{margin:20px} Code prettify wraps the whole line in .com <span class=com>#wrap{margin:20px}</span> Somebody
I have a MySQL table with the following columns: id(int), date (timestamp), starttime(varchar), endtime(varchar),
I need to get the proper value of hours from a time string. Here
this is what i did: CTime startTime = CTime::GetCurrentTime(); // ... perform time-consuming task
for example i want to call a js function at 10.00.00.00 am how can
I have two fields (StartTime and EndTime) both are varchar field (It was created

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.