This macro function takes in a string sDateString containing a series of numbers, each separated by sDateSeparator, and returns a string where consecutive numbers are concatenated using sConcatChar.
For example, the string '1,3,4,6,7,8,9,12' would be returned as '1,3,4,6-9,12'.