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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:09:15+00:00 2026-06-04T09:09:15+00:00

I have a program that checks for the date and minute part of my

  • 0

I have a program that checks for the date and minute part of my job object. If these match then it triggers a particular job.

   If jb.ScheduledStartTime.Value.ToString("MM/dd/yyyy mm") =
 Now().ToString("MM/dd/yyyy mm") Then
                        'Do some work here.
                    End If

Issue:
If I schedule different jobs during the day at different time interval then they just work fine. I mean they are triggered and in the above code they enter the loop when it matches the current format.

However, it doesn’t work when the date changes at 12:00. Even though I have scheduled start time set to trigger at 9:00 AM in the morning it enters the loop exactly at 12:00 AM which is invalidating my logic leaving me confused.

Why is this happening? Is my date and minute checking logic incorrect here? Is there any better way of doing this?

I don’t check for exact seconds here I just check for the minute part.

  • 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-04T09:09:17+00:00Added an answer on June 4, 2026 at 9:09 am

    Also check the hour part (HH) of the dateteime, your format should be “MM/dd/yyyy HH:mm”

    try this

     If jb.ScheduledStartTime.Value.ToString("MM/dd/yyyy HH:mm") =
        Now().ToString("MM/dd/yyyy HH:mm") Then
                            'Do some work here.
     End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an idea for a program that will do a particular job for
I have a really simple program that checks the date and returns if the
I have a simple program that checks webpages for strings, example: Private Sub Button1_Click(ByVal
On my program I have a function that checks for the current version of
I have a program that saves an image in a local directory and then
I have a program that checks if a file is present every 3 seconds,
As part of an assignment I need to create a shipping program that checks
I have a program that checks the modification time of a file and executes
We have a program that the installer checks for the existence of a config
I have a program that gets the incoming number, date and time. I want

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.