How do I write expression for converting Date Format?

Ramana Kopparapu 306 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
0 comments No comments
{count} votes

Answer accepted by question author
  1. Olaf Helper 47,581 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 41,536 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.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.