Date Format in SQL setting in 2008 r2


  • I have SQL tabe with name as  Table1 and  date fileld also .

    Now when I am selecting the Table1 data. I can see my date field of data showing as  yyyy-mm-dd  format.

    How can i show the dd mm yyyy format default. Bcz otherwise I want to change my application lot of place.

    I want to change this date format in date field of property.instead of using format function in sql.


    Select * from Bak where Dated='11-14-2013'    // this is working

    Select * from Bak where Dated='14-11-2013' // this is not allowing system. 

    Bak is View of table Table1


    • Edited by Mujeeb85a Saturday, November 16, 2013 8:10 AM
    Saturday, November 16, 2013 7:51 AM


  • try this: 

        select convert(varchar, getdate(),105)

    Regards Harsh

    Saturday, November 16, 2013 8:04 AM
  • Hi Mujeeb85a,

    That would work  fine.

    but i am not sure why do want to that kind of conversion, these conversion are handle by driver used to connect to sql server very well. Even you application passes it in dd-mm-yyyy, driver convert it into appropriate format. 



    Regards Harsh

    Saturday, November 16, 2013 9:30 AM
  • Hi Mujeeb85a,

    When using Convert(varchar,DateColumn,105) in your SQL statements as Harsh suggested, you also need to modify the data type of the Output DateColumn from DT_DBTIME to DT_STR. Otherwise, SSIS will format the values using its own DT_DBTIME format before transferring the values to another Data Flow Task. To do this, open the Advanced Editor of the source control, expand the Output Columns, and select the date column to change its DataType property. Please see the screenshot:

    In addition, as Harsh said, if you import the data to another SQL Server table, it seems to be unnecessary to modify the date format within the package.


    Mike Yin
    TechNet Community Support

    Thursday, November 21, 2013 2:42 PM

All replies