How do I write expression for converting Date Format?

Ramana Kopparapu 226 Reputation points
2023-05-23T06:39:16.22+00:00

I want to convert English Date to French Format by writing in Expression builder in SSIS...

Could anyone look into this and do needful?

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,456 questions
0 comments No comments
{count} votes

Accepted answer
  1. Olaf Helper 40,901 Reputation points
    2023-05-23T06:44:44.48+00:00

    If the source for a date value is a string, then it has a string format.

    If the destination is of date(time), it has a (binary) value without any format.

    You can use plain T-SQL function CONVERT with format parameter 103 = British, see

    https://learn.microsoft.com/en-us/sql/t-sql/functions/cast-and-convert-transact-sql?view=sql-server-ver16

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. ZoeHui-MSFT 33,126 Reputation points
    2023-05-24T02:21:58.2+00:00

    Hi @Ramana Kopparapu

    It seems that we could not do that from SSIS Expression builder.

    You may load data to staging table and then use tsql command to do that.

    SET LANGUAGE French
    SELECT CONVERT(VARCHAR(12),CAST('2015-01-01' AS DATETIME),107)
    
    
    

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.