I am bringing in a column in my data that is yyyymm text and creating two additional columns for yyyy and mm in order to join to other tables.
Example of Table:
YYYYMM (text) | YYYY (text) | MM (text) |
---|---|---|
201604 | 2016 | 04 |
I would like to create a date column based on this information. In my last step, I was going to leverage the LastDayOfMonth(<date>) calculation to align the day with the last day of each month.
I have tried three formulas:
1. MakeDate(yyyy,mm,28):
Error Message: Function MakeDate expects parameter 1 of type 'integer', but receives 'string'. Try using the expected parameter type
2. MakeDate(ToNumber(yyyy),ToNumber(mm),28):
Error Message: Function MakeDate expects parameter 1 of type 'integer', but receives 'double'. Try using the expected parameter type
3. ToDate(Concatenate(YYYYMM,28),"yyyy/mm/dd")
The column populates, but it's blank.
The third try looks similar to this thread, but their answer did not work for me: Function ToDate uses an invalid format 'yyyyMMdd' for parameter format. Try rewriting the formula.