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 > date and string

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-23-04, 23:31
ayu ayu is offline
Registered User
 
Join Date: Apr 2004
Location: Malaysia
Posts: 25
Exclamation date and string

I want to do update a table at the date datatype. The fieldname is tarikhmula
I retrieve a date from calendar and sent to the second page and this date become string.

I'm using this statement

sq = "update RekodCuti set jumcuti = '"&jum&"', tarikhmula = '"&tt&"' where idrekod = "&idrekod
set rs = db.execute(sq)

I get error message datatype mismatch and I find the error because I update tarikhmula with tt.

can somebody help me.
Reply With Quote
  #2 (permalink)  
Old 05-23-04, 23:45
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
What format is tt in at this point?? is it dd/mm/yyyy or yyyymmdd or mm-dd-yyyy or what?

What format are your dates in the database? What sort of database are you using??
Reply With Quote
  #3 (permalink)  
Old 05-24-04, 10:09
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
right after this line:
sq = "update RekodCuti set jumcuti = '"&jum&"', tarikhmula = '"&tt&"' where idrekod = "&idrekod

put this and post the results:
Response.Write sq
__________________
That which does not kill me postpones the inevitable.
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