Results 1 to 3 of 3

Thread: date and string

  1. #1
    Join Date
    Apr 2004
    Location
    Malaysia
    Posts
    25

    Exclamation Unanswered: 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.

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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??

  3. #3
    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.

Posting Permissions

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