Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Select Dates within a period of days

Select Dates within a period of days

Scheduled Pinned Locked Moved C#
helpcsharpcsslinqdata-structures
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RadioButton
    wrote on last edited by
    #1

    Hello needs some help with this one: I have a 384 days of rates a rate price and date. I am trying to fill a graph by day of rates. I am allowing the user to select 30, 60 or 90 days of rates within a start and end date of choosing. I am trying to use linq to return only 30, 60 or 90 days of rates based on the start and end dates. The issue is the start and end date range could be less then let's say 30 days so I still want to return 30 days of rates. I have not been very successful. Thanks so much for the help.

    D B 2 Replies Last reply
    0
    • R RadioButton

      Hello needs some help with this one: I have a 384 days of rates a rate price and date. I am trying to fill a graph by day of rates. I am allowing the user to select 30, 60 or 90 days of rates within a start and end date of choosing. I am trying to use linq to return only 30, 60 or 90 days of rates based on the start and end dates. The issue is the start and end date range could be less then let's say 30 days so I still want to return 30 days of rates. I have not been very successful. Thanks so much for the help.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      And without showing your query code, there is very little anyone can do to help you.

      A guide to posting questions on CodeProject

      Click this: Asking questions is a skill. Seriously, do it.
      Dave Kreskowiak

      1 Reply Last reply
      0
      • R RadioButton

        Hello needs some help with this one: I have a 384 days of rates a rate price and date. I am trying to fill a graph by day of rates. I am allowing the user to select 30, 60 or 90 days of rates within a start and end date of choosing. I am trying to use linq to return only 30, 60 or 90 days of rates based on the start and end dates. The issue is the start and end date range could be less then let's say 30 days so I still want to return 30 days of rates. I have not been very successful. Thanks so much for the help.

        B Offline
        B Offline
        BillWoodruff
        wrote on last edited by
        #3

        You will need to adjust the start, or end, dates before making your query. If the start date is outside the range of the available data-days: 1. if it's before the first day, then return #n data-days beginning on the first day ... or return an error. 2. if it's after the last day, then return the last #n data-days from the data ... or throw an error. 3. if the start date is in the valid range, but the user wants more data-days than are possible, decrease the start date so you can return the required data-days data. You don't specify how exactly, given valid start and end dates you let the user choose which 30,60,90 day chunk to return, so can't comment on that.

        «I'm asked why doesn't C# implement feature X all the time. The answer's always the same: because no one ever designed, specified, implemented, tested, documented, shipped that feature. All six of those things are necessary to make a feature happen. They all cost huge amounts of time, effort and money.» Eric Lippert, Microsoft, 2009

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups