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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:28:58+00:00 2026-05-24T04:28:58+00:00

I have a textfield that users input the date using a modified jquery datepicker.

  • 0

I have a textfield that users input the date using a modified jquery datepicker. The textfield has the Month and Year such as ‘July 2011’

I need to run a query to search for results between July 1, 2011 and July 31, 2011. My date in the database is a smalldatetime, so I need my query to look like this:

select * from members where signupdate between 'july 1 2011' and 'july 31 2011'

How can I get the user inputted date of July 2011 converted to ‘July 1 2011’ and ‘July 31 2011’?

EDIT

I’m only getting a 0 value from InvalidCount but I know I have one record in there as a test. Why isn’t it being counted?

MY PROC:

SELECT
(SELECT COUNT(*) FROM dbo.Members m WHERE m.memberID = @pMemberID AND m.SignUpDate BETWEEN @pDate AND DATEADD(MONTH, 1, @pDate)-1) AS 'SignUpDate',
COALESCE(SUM(m.ValidCount), 0) AS ValidCount,
COALESCE(SUM(m.InvalidCount), 0) AS InvalidCount

FROM
dbo.Members m

INNER JOIN 
dbo.MemberStats ms ON m.MemberID = ms.MemberID  

WHERE 
m.SignUpdate BETWEEN @pDate AND DATEADD(MONTH, 1, @pDate)-1
  • 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-24T04:29:00+00:00Added an answer on May 24, 2026 at 4:29 am

    The exact syntax depends on the SQL Engine, but if you start with the 1st of the month, then add 1 month, and finally subtract 1 day; you get the end of the month.

    (I’ll assume MS SQL Server to match your C# tag)

    SELECT
      *
    FROM
      members
    WHERE
      signupdate BETWEEN @param AND DATEADD(MONTH, 1, @param) - 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rails form that has a datetime input. I'd like to make
I have a class that looks like this: public class TextField : TextBox {
How do I process a date that is input by the user and store
I am trying to have the user input a number, and then that number
I have a JFrame that contains a display JPanel with JTextField and a control
I have a text field (flash.display.textField) for editing, but the default font does not
How do I manipulate textfield variables within an iPhone app? I want to have
I've got a bit of a usability issue that I'd value some input on.
I have a project that adds elements to an AutoCad drawing. I noticed that
I have a script that appends some rows to a table. One of the

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.