Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Location
    Malaysia
    Posts
    25

    Thumbs down Unanswered: error on check date

    I'll try to do a list where the condition is check the date in the table with the system date.

    DatumTid=Date()
    Response.write(DatumTid)


    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_data_STRING
    Recordset1.Source = "SELECT RekodCuti.nostaffuitm, RekodCuti.tarikhmula, RekodCuti.hingga, staffIT.nostaffuitm, staffIT.namastaffuitm, staffIT.kodjawatan, staffIT.kodjabatan FROM RekodCuti INNER JOIN staffIT ON RekodCuti.nostaffuitm = staffIT.nostaffuitm WHERE RekodCuti.tarikhmula = '" & DatumTid & "'"
    Recordset1.CursorType = 0
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 1
    Recordset1.Open()

    The error message is data type missmatch.
    Can somebody help me.

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    What is the datatype for the column "tarikhmula"?
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Apr 2004
    Location
    Malaysia
    Posts
    25
    The dattype for tarikhmula is date/time

  4. #4
    Join Date
    Dec 2003
    Posts
    454
    Which database server are you using? MS SQL or MS Access?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •