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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. date comparision problem in vb.net project

date comparision problem in vb.net project

Scheduled Pinned Locked Moved Visual Basic
databasehelpcsharp
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.
  • A Offline
    A Offline
    ajay bharti
    wrote on last edited by
    #1

    hi, i have to set timer in my windows application. if date of set_timer column in database is equal to system date time then a beep should be generated. i am unable to write exect code for retrieving that perticular date where set_timer= system.datetime.now() i had write sql query in adapter, all were failed to get data from data set. select * from case_details where (set_timer= dt) select * from case_details where (set_timer= 'dt') select * from case_details where (set_timer= '&dt&') where dt was declared as dim dt as system.datetime dt= datetime.now() i had also use convert function as select * from case_details where (set_timer= CONVERT(DATETIME,dt,102)) it is also not woking plz help me. hi this ajay bharti

    C 1 Reply Last reply
    0
    • A ajay bharti

      hi, i have to set timer in my windows application. if date of set_timer column in database is equal to system date time then a beep should be generated. i am unable to write exect code for retrieving that perticular date where set_timer= system.datetime.now() i had write sql query in adapter, all were failed to get data from data set. select * from case_details where (set_timer= dt) select * from case_details where (set_timer= 'dt') select * from case_details where (set_timer= '&dt&') where dt was declared as dim dt as system.datetime dt= datetime.now() i had also use convert function as select * from case_details where (set_timer= CONVERT(DATETIME,dt,102)) it is also not woking plz help me. hi this ajay bharti

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

      A datetime runs right down to the millisecond. You need to make your query so that it has less granularity, by either stripping info from all datetimes you store ( for example, set all milliseconds to zero ), or by using a range in your query. Christian Graus - Microsoft MVP - C++

      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