SSIS - How to bring out month as two digits, i.e 07 instead of 7.

neilsja 141 Reputation points
2021-07-19T13:11:49.153+00:00

Hi All

The SQL I have written shows the month as 07 when I put a viewer on the flow. However, as soon as it hits the 'sort' function and check the data, the month now comes out as 7, and I cannot get it to show it with 2 characters, any ideas.

115810-image.png

115886-image.png

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

Accepted answer
  1. ZoeHui-MSFT 36,661 Reputation points
    2021-07-20T02:51:54.607+00:00

    Hi @neilsja ,

    Could you please show the datatype in the sql server of the month column for us?

    I tested locally that I couldn't reproduce your issue.

    116087-untitled.png

    You may also help check the datatype of month in sort1 advanced editor.

    116045-screenshot-2021-07-20-105116.jpg

    Regards,

    Zoe


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ryan Abbey 1,181 Reputation points
    2021-07-19T20:36:57.377+00:00

    An implicit conversion to numeric has happened somewhere

    0 comments No comments

Your answer

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