Parsing Dates and calculating Last day of month with a Custom Expression

I have two columns with string dates called Start month and end Month as "yyyy-mm" but I need to convert them into a Date data type. for that, I add a Transformation or Calculated column:

The Start month is easy to parse:

Date(Integer(left([Start Month],4)),Integer(right([Start Month],2)),1)

For the end month, I have to add a month and extract one day after I parse the date:

DateAdd('day',-1,DateAdd('month',1,Date(Integer(left([End Month],4)),Integer(right([End Month],2)),1)))
Previous
Next Post »