Results 1 to 4 of 4

Thread: Mysql CAST

  1. #1
    Join Date
    Oct 2005
    Posts
    2

    Question Unanswered: Mysql CAST

    Hi !

    Does anyone know how to cast a string date like '2005-10-12 12 : 15 : 00' in a DATETIME format in an Update query ?
    Thank you.

  2. #2
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    Code:
    SELECT TIMESTAMP( str_to_date( '2005-10-12 12:15:00', '%Y-%m-%d %H:%i:%s' ) )

  3. #3
    Join Date
    Oct 2005
    Posts
    2

    It Works

    It works with timestamp. In my case, i use it in an update query and it is working very well.
    Thank you.

  4. #4
    Join Date
    Oct 2003
    Posts
    63

Posting Permissions

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