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. Visual Basic
  4. check if the date given is within the specific range please help...

check if the date given is within the specific range please help...

Scheduled Pinned Locked Moved Visual Basic
helptutorial
2 Posts 2 Posters 0 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.
  • C Offline
    C Offline
    cutequencher
    wrote on last edited by
    #1

    my problem is i am about to enter new dates: for example the new date is 6/6/2007 8:15:16 then i need to check if this new date will fall between an existing date... existing date : 5/6/2007 8:23:54 and 7/6/2007 9:45:10 how could i be able to do that... can you give me a solution... i dont know if there is a predefined function for that... thnx!

    C 1 Reply Last reply
    0
    • C cutequencher

      my problem is i am about to enter new dates: for example the new date is 6/6/2007 8:15:16 then i need to check if this new date will fall between an existing date... existing date : 5/6/2007 8:23:54 and 7/6/2007 9:45:10 how could i be able to do that... can you give me a solution... i dont know if there is a predefined function for that... thnx!

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      The < operator works with DateTime. So create your two range datetimes, and then check if your date > one and < the other. I'd write a helper function to do this.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      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