December 11, 2017 at 6:03 am
I'm not sure how to go about this. I have a series of dates that are strings in the input (month/day/year):
4/23/2012
1/21/2013
3/4/2013
04/02/2015
I am using a derived column to transform them into output database timestamp [DT_DBTIMESTAMP]. I need to build a nested IF statement that converts the month to two characters if it is a single character and the day to two characters if it is a single character. Then I am converting the entire date to a database timestamp [DT_DBTIMESTAMP] if the length is 0.
Any help is appreciated!
December 11, 2017 at 6:12 am
karen.ferrara - Monday, December 11, 2017 6:03 AMI'm not sure how to go about this. I have a series of dates that are strings in the input (month/day/year):4/23/2012
1/21/2013
3/4/2013
04/02/2015I am using a derived column to transform them into output database timestamp [DT_DBTIMESTAMP]. I need to build a nested IF statement that converts the month to two characters if it is a single character and the day to two characters if it is a single character. Then I am converting the entire date to a database timestamp [DT_DBTIMESTAMP] if the length is 0.
Any help is appreciated!
You don't need an IF for this. Instead, use:
RIGHT( "0" +[MonthExpression],2)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy