If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > error on check date

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-04, 03:08
ayu ayu is offline
Registered User
 
Join Date: Apr 2004
Location: Malaysia
Posts: 25
Thumbs down 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.
Reply With Quote
  #2 (permalink)  
Old 05-13-04, 10:51
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #3 (permalink)  
Old 05-13-04, 20:43
ayu ayu is offline
Registered User
 
Join Date: Apr 2004
Location: Malaysia
Posts: 25
The dattype for tarikhmula is date/time
Reply With Quote
  #4 (permalink)  
Old 05-18-04, 22:31
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Which database server are you using? MS SQL or MS Access?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On