I wanted to see if it is possible to combine two strings and order them by Date/Time?
dim strcountstf
dim strDateNTimes
dim strCOMBO
strcountstf = "02/01/2012 3:05am###,02/02/2012 7:05am###,02/05/2012 8:30pm###"
strDateNTimes = "02/01/2012 2:20am###,02/02/2012 8:00am###,02/06/2012 6:45pm###"
strCOMBO = strcountstf & strDateNTimes
Now strCOMBO will give me both of the strings together but I need them to be sorted by date/time, maybe using the CDate function?
Thanks again everyone I really appreciate all of the help that you give me.
Take a look at this quetion and using that, you can do something like this
Results:
Please note that you have to make sure that the string can be parsed using CDate function and results in a valid date or do whatever you have to when calling
Call objSortedList.Add(CDate(Replace(arrCombo(i), "###", "")), arrCombo(i))
i.e. the first argument (Key) must be a valid date, if you want to sort by date.Just my version