SQL Server Performance

Epression Builder,Convert/Cast SQL column Data Type of Int to type: String & Date

Discussion in 'SQL Server 2005 Integration Services' started by Ismailc, Aug 22, 2007.

  1. Ismailc New Member

    Hi,
    I need help converting/casting a SQL column Data Type of Int to type: String & Date
    Does anyone have any examples, i need to do it via an expression.
    Regards,
  2. Madhivanan Moderator

    Can you post some sample data and the reult you want?
  3. Ismailc New Member

    Thanks for the help.
    From Int Column: 20070131
    To String: 20070131
    2007/01/31
    2007.01
    To Date: 2007/01/31 00:00:00
    Please have a look.
    Regards,
  4. dineshasanka Moderator

    you can use derive column component's type cast functions to do this.
    If you can send me a mail to dineshasanka@gmail.com, I can send u a sample package
  5. Madhivanan Moderator

    select cast(cast(20070131 as varchar(10)) as datetime)
    To format to string, use fromat function in front end application
    [quote user="Ismailc"]
    Thanks for the help.
    From Int Column: 20070131
    To String: 20070131
    2007/01/31
    2007.01
    To Date: 2007/01/31 00:00:00
    Please have a look.
    Regards,
    [/quote]

Share This Page