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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:52:07+00:00 2026-05-20T16:52:07+00:00

I have a transaction table which has start_date and end_date of datetime datatype. I

  • 0

I have a transaction table which has start_date and end_date of datetime datatype.

I am passing date from vb.net application. I wrote following code in vb.net application and query generated was somthing un-expected:

String.Format("SELECT * FROM {0}{1} WHERE {0}tran_date >= '{2}' and {0}tran_date <= '{3}' ;", _Pre, _Table, DateFrom.Date, DateTo.Date)

Here Both DateFrom and DateTo are date variables.

It produced output like:

SELECT * FROM rm07transaction 
WHERE 
    rm07tran_date >= '03/16/2011 12:00:00 AM' and 
    rm07tran_date <= '03/16/2011 12:00:00 AM' 

When i make query to find data of 03/16/2011 they are not populated

  • 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-20T16:52:08+00:00Added an answer on May 20, 2026 at 4:52 pm

    In your example you are searching for rows that have “rm07tran_date” exactly set to “03/16/2011 12:00:00 AM”. What you want is to use the “start date” column and the “end date column”. EG:

    SELECT * FROM rm07transaction 
    WHERE 
        rm07tran_StartDate >= '03/16/2011 00:00:00 AM' and 
        rm07tran_EndDate < '03/17/2011 00:00:00 AM'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table transaction which has duplicates. i want to keep the record
In an existing application, I have a table which has no primary key, which
I have a table schema which is essentially a bunch of transaction info with
I have a table that stores transaction information. Each transaction is has a unique
Our application has a table which stores all transactions records of clients in one
Our application has a very large, wide table of transactional data. We have a
I have the following table: Transaction_ID int(9) NO PRI NULL auto_increment Datetime date NO
I have a database table transaction which stores all the transaction made by users
Why transaction does not rollback Identity column. I have a table named DetailReports which
I have a table which has around 1 million rows (size on physical disk

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.