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 9289179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:06:44+00:00 2026-06-18T20:06:44+00:00

Goodday, I use the below code to start a timer . Label2.Text = Difference1.TotalMinutes.ToString(N0)

  • 0

Goodday, I use the below code to start a timer .
Label2.Text = Difference1.TotalMinutes.ToString(“N0”)
But the minutes are always 30 seconds out. The label shows the time as 1 minute when only 30 seconds have elapsed and thereafter I’m always 30 seconds out.
How can I calibrate this?
Thanks
Rob

  • 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-06-18T20:06:45+00:00Added an answer on June 18, 2026 at 8:06 pm

    If you look at the definition for the TimeSpan.TotalMinutes property it states that it:

    Gets the value of the current TimeSpan structure expressed in whole and fractional minutes.

    Therefore when you use the ToString(“N0“) format you are telling it that you want no decimal places and since it is a numeric format it will round your value up. You should look at using the TimeSpan Custom Formats in particular in this case the %m Custom Format string. It should look something like this:

     Label2.Text = Difference1.TotalMinutes.ToString("%m") 
    

    Code I used to test. Timer interval is set to 1000 and is enabled.

    Public Class Form1
        Dim startTime As DateTime = DateTime.Now
        Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
            Label1.Text = (DateTime.Now - startTime).ToString("%m")
            Label2.Text = (DateTime.Now - startTime).TotalSeconds.ToString("N0")
        End Sub
    End Class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day, I try to start new Activity from another. But it always crashed.
Goodday I can't seem to use my dataset in a Null comparison I'm trying
I have a strange problem in matching a pattern. Consider the Perl code below
Good day! i have a code below: def initial(*args): for arg in args: with
Good day! I use pg_search to implement Full text searching in my web app.
Good day, I have a library project that i use to create a paid
Good day all I have the following question: I would like to use Chart
Good day! I use file_get_contents for give answer from remote address and explode for
Good day to you, I use Castor to map network infrastructure into Java classes.
Good day. As i know. There is a root element in XML file. But

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.