Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Unanswered: Sybase DATETIME data-type

    Is there a way to show a column having a data-type DATETIME in the format where it has DATE and TIME up to the seconds figure.

    like:

    01-JAN-2003 00:00:00 (shown as DD-MMM-YYYY hh24:mm:ss)

    I like this to be the format when I do my 'select ' statement.

    Thanks.

  2. #2
    Join Date
    Sep 2003
    Posts
    17

    Re: Sybase DATETIME data-type

    Hi,

    Try this:

    select stuff(stuff(convert(varchar(12), getdate(), 106),3,1,"-"),7,1,"-") + " " + convert(varchar(12), getdate(), 108)

    Regards,
    Ulrike

    Originally posted by Levy
    Is there a way to show a column having a data-type DATETIME in the format where it has DATE and TIME up to the seconds figure.

    like:

    01-JAN-2003 00:00:00 (shown as DD-MMM-YYYY hh24:mm:ss)

    I like this to be the format when I do my 'select ' statement.

    Thanks.

Posting Permissions

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