Results 1 to 3 of 3

Thread: CDATE in SQL

  1. #1
    Agata Guest

    Default CDATE in SQL

    Hello people.<BR>I know my question is a little of the subject of ASP but I&#039ll ask it anyway. Here is my problem :<BR>In my DB (SQL) I have a table with a field DATES in it . The datatype of the field is Varchar (dont ask me why but thats the way it is and I&#039m not in the position to change it). The entries looks like this: 11/11/99 or 11/11/00. I&#039m trying to sort it by date inside my SELECT statement on my ASP page. I know there is a function in SQL (similar to Cdate in ASP) but I dont rememeber which and how to use it .<BR>Please, please, please refresh my memory or if you think there is a better solution please point me in the right direction.<BR>Any kinda help is greatly appreciated.

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: CDATE in SQL

    See what the convert finction does

  3. #3
    Agata Guest

    Default AKHILESH 4 PRESIDENT !!!!

    Thank you very much, this is exactly what I needed:<BR>MySQL = "SELECT * FROM news ORDER BY CONVERT(datetime,dates)"<BR>Love ya all !!!<BR>

Posting Permissions

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