month value in vb script

  • I am using vb script in my ssis and within that i am trying to cocatinate 4 fields into an ID field, one of the 4 fiels is month which return only 1 digit, say if i have Jan it returns " 1 " but i am expecting "01" instead so as to make my ID unique.

    How do i retun 01 instead of 1 in vb script for month.

  • Cast to string, check if it's 1 character, and if so, add a "0".

    It returns a number. "01" is not a number, according to western math.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply