Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    53

    Unanswered: convert text into date format

    i have a page where user will enter the date that the want and the system will search in database the infoo for that date. in database i save date as ganeral(system date). i can do the retrieval because the system will give me an error msg saying that there is a mismatch error.how to solve it......

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    basically you need to format you date in a manner that the database will understand.

    I find that dd-mmm-yyyy is generally the best.... but it may not work for you.

    Using asp you can us the day, month, monthname and year functions to get parts of dates so you can reformat the layout of them...

    HTH.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    108
    Do a search for "CONVERT", which is a Sql server command.

    That will give you the answer.

  4. #4
    Join Date
    Mar 2004
    Posts
    53

    tell me more

    can you tell me more plzzzzzzzzz

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    108

    Re: tell me more

    Originally posted by fisya
    can you tell me more plzzzzzzzzz
    Yes. Open your SQL Server Query Analyzer, or your Interdev development environment. Then type the word CONVERT... Then hit F1.

    Then read the help file on how to use CONVERT.

    `Le

    Give a Man a fish, and he will eat for a day. Teach a man to fish, and he will eat for a lifetime.

Posting Permissions

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