I have a column that generally follows the following format: "# years, # months, # days". What I want to do is basically split the column into 3 new columns that have the number of years, months, and days. Normally, this could be done pretty quickly if the formatting stays consistent.
But there might not be an "s" if the numbers are just "1": "1 year, 1 month, 1 day".
Also, there need not be 3 numbers. For example: "2 years, 7 days" or "1 month, 28 days" or "5 years, 15 days" or "21 days".
I have a feeling this is going to need a long and complicated regex expression, so I really appreciate whatever help you can share.
Solved! Go to Solution.
Never mind, I just realized I can use datediff( ) on the appropiate columns for a much simpler solution.
User | Count |
---|---|
61 | |
24 | |
23 | |
21 | |
20 |