date format settings info needed

  • Hi,

    I'm trying to understand how sql server handles dates in the db. I have created tables with column type "datetime" which by default took the dd/mm/yyyy formay but nowhere it was asked me to decide which format I wanted. Say I want to change to mm/dd/yyyy. What should I do?

    Also I have installed two sql server 2000 clients, which displays the dateformat in different modes, one is giving me the dd/mm/yyyy while the other dd/mm/yy, does anybody know where to set the display properties?

    Thanks in advance.

    M71

  • You really should take a look at the Books OnLine (BOL). You need to understand that the way datetime is STORED is different than the way it is DISPLAYED. The datetime is NOT stored, in SQL, as mm/dd/yyyy or any other 'format'. It's stored as the number of seconds from a specific date.

    When you display the datetime, the format used is the one that was set when SQL Server was installed. HOWEVER, you can change (convert) the display format. See the BOL for CONVERT syntax and usage.

    -SQLBill

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply