Find the answer to your Linux question:
Results 1 to 2 of 2
i have database for store the personel detail such as name ,lastname, and birthday name varchar lastname varchar birthday varchar but i want to query birthday by order DESC. " ...
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    84

    how to covert varchar type to timestamp on mysql query.

    i have database for store the personel detail such as name ,lastname, and birthday

    name varchar
    lastname varchar
    birthday varchar

    but i want to query birthday by order DESC.

    " select * from userdata order by birthday DESC "

    that query syntax not working (i think becuase i store birthday in varchar type)

    !! How to arrange birthday by order DESC.

    condition
    1. i need store birthday filed in varchar type only.
    2. i write code on php.

  2. #2
    Linux User
    Join Date
    Jul 2004
    Location
    Poland
    Posts
    368
    MySQL AB :: MySQL 5.0 Reference Manual :: 12.6 Date and Time Functions Use the function to convert varchar to date in your ORDER BY condition
    "I don't know what I'm running from
    And I don't know where I'm running to
    There's something deep and strange inside of me I see"

Posting Permissions

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