Results 1 to 8 of 8

Thread: [RESOLVED] date format problem? datatype mismatch error

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Posts
    83

    Resolved [RESOLVED] date format problem? datatype mismatch error

    Hi,

    I have a date time picker which displays date in the long format -
    Friday, April 13, 2007.

    I have a table where my date field is formated as short date - 13/4/2007.

    My problem is that i get an error when trying to use value property of the datetime picker when passing it in the sql statement.

    it is as follows

    Code:
    "Select * from tablename where datefieldname='" + dtpDatePick.Value + "'";
    I get a datatype mismatch error.
    I need to keep the date view in the long format itself. Therefore how can I format the date when I pass it in the sql statement.
    Last edited by sunshine123; Apr 13th, 2007 at 11:32 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width