Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2002
    Posts
    22

    Unanswered: setting Sybase datetime format

    I notice that whenever I retrieve datetime data from a Sybase database, the hour component is always in 12 hour format i.e. 12AM or 12PM.

    Is it possible to set the default time format for the Sybase database to use 24 hour clock instead? i.e. 0-23.

    thanks in advance
    - Garry

  2. #2
    Join Date
    Mar 2003
    Posts
    15
    hay gfcronin,

    you can use

    select convert(varchar(20),getdate(),108)

    to get 24 hours clock, but you will have to retrive data seprately


    getdate() can be replaced wit your tables datetime column

    HTH
    db_mate

  3. #3
    Join Date
    Apr 2002
    Posts
    22
    Thanks!

    So what you're saying is that there's no way to set the default clock to 24 hour in Sybase i.e. I must always use the convert() function to convert the 12 hour clock value into 24 clock value?

    thanks in advance
    - Garry

Posting Permissions

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