I have a table where data is displayed in the format of YYYY-####. Sometimes, there are values like 2012-456 and 2012-1234. By default, the sorting places 2012-1234 before 2012-456. If I change the sort to 'numeric', it disrupts the order of other years (for example, would sort as 2012-456, 2013-555, 2012-1234). My assumption is that I need to add leading zeros to the digits after the hyphen if they are less than 4 digits, but I haven't been successful in getting the sorter to work. I attempted using .addParser but am unfamiliar with it and have not found success. Are there any informative articles on this topic or does anyone have a solution?
Below is an illustration of sample data that is being sorted incorrectly and should be arranged by year (first 4 digits) followed by the number after the hyphen:
**Additionally, the date format could have, obviously, been better, but in this instance, I am unable to adjust how it is inputted.