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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:43:18+00:00 2026-05-22T00:43:18+00:00

In a report generator I wrote the user can select a date range to

  • 0

In a report generator I wrote the user can select a date range to display results for. But since the data for this report is generated monthly the day portion of the date range is really irrelevant. I now have the requirement to change the day of the selected start date to ‘1’ regardless of what the user has selected. I’ve done this like so:

$('#TextStartDate').datepicker({ maxDate: "+0M", minDate: "-24M", dateFormat: 'm/1/yy' });

The second pard of the requirement is that the day of the selected end date be set to the last day of the month regardless of what day was selected. So if the user selected an end date of 5/16/2011 then the date field would show 5/31/2011. This is where I get stuck.

Any help would be greatly appreciated.

  • 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-22T00:43:18+00:00Added an answer on May 22, 2026 at 12:43 am

    The most consistent technique I have found for this is:

    1. Add one month to the select day

    2. Round to the first day of that month

    3. Subtract 1 day.

      Not necessarily pretty, but it works.

    Plan B:

    1. Round to first of the selected month
    2. Add 1 month
    3. Subtract 1 day

    note: working on a quick sample code will add later

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I generate a report in access with the data from a recordset
I have a GWT page where user enter data (start date, end date, etc.),
I developed a Word 2003 report generation application that extracts data from a database.
Is there some way to cache a generated report in the reporting services, so
When the user clicks on a link to generate report I make an AJAX
I am generating an automatically generated periodical report with Sweave. In order to create
Are there any API/solution to generate PDF report from XML file data and definition.
A simple problem. I have an ASHX handler which generates a report. Unfortunately, this
Good Sunday morning! After fiddling around with some JavaScript this weekend, I finally wrote
READ FIRST I re-wrote this to make it more readable. If you want to

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.