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. Web Development
  3. ASP.NET
  4. Birthday date problems

Birthday date problems

Scheduled Pinned Locked Moved ASP.NET
csharpdatabasevisual-studiocomhelp
23 Posts 4 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.
  • J Jintal Patel

    hiii this will definately work just change ur str2 to belove str2 = "select * from Birthday WHERE (DATEPART('m', BDate)) = '" & Date.Today.Month & "' And (DATEPART('d', BDate)) = '" & Date.Today.Day & "'" cm = New OleDbCommand(str2, con) GridView1.DataSource = cm.ExecuteReader(CommandBehavior.CloseConnection) GridView1.DataBind()

    Jintal Patel

    M Offline
    M Offline
    matjame
    wrote on last edited by
    #21

    You have no idea how much this means to me.It works like a charm. I wud buy you lunch, but ur there.Thanx a million. Damn, thank you very much.

    kagiso

    J 1 Reply Last reply
    0
    • S Sun Rays

      matjame wrote:

      Syntax error (missing operator) in query expression 'BirthDate LIKE '*/09/20' 2007/11/13'. comx = New OleDbCommand("Select * from Bithdays where BirthDate LIKE '*/09/20' " & Date.Today, conx) comx.Connection = conx 'enure that the command follows the rite connection If conx.State = ConnectionState.Open Then conx.Close() End If conx.Open() Dim datar As OleDbDataReader = comx.ExecuteReader Error appears on the above statement

      Hi, What are you doing here ???????? write query as below... Select * from Bithdays where BirthDate LIKE '*/" + DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() "'"

      Thanks, Sun Rays

      M Offline
      M Offline
      matjame
      wrote on last edited by
      #22

      Howzit Sun Rays. Here is how the problem was solved. str2 = "select * from Bithdays WHERE (DATEPART('m', BDate)) = '" & Date.Today.Month & "' And (DATEPART('d', BDate)) = '" & Date.Today.Day & "'" cm = New OleDbCommand(str2, con) GridView1.DataSource = cm.ExecuteReader(CommandBehavior.CloseConnection) GridView1.DataBind() Thanx a million for your assistance

      kagiso

      1 Reply Last reply
      0
      • M matjame

        You have no idea how much this means to me.It works like a charm. I wud buy you lunch, but ur there.Thanx a million. Damn, thank you very much.

        kagiso

        J Offline
        J Offline
        Jintal Patel
        wrote on last edited by
        #23

        welcome

        Jintal Patel

        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