Convert to or convert from date string
int okutil_date_str_convert( DoubleArray * pdDates, StringArray * psDates, LPCSTR lpcszFmt, bool bStrToDate = true )
0 for success, > 0 return the array index+1 that failed to be converted, <0 for other errors
EX1
void ds_test() { vector<string> vs; vs.Add("20200401");vs.Add("20200501"); vector<double> vd; okutil_date_str_convert(&vd, &vs, "yyyyMMdd"); vd += 1;//add one day vector<string> vs2; okutil_date_str_convert(&vd, &vs2, "yyyyMMdd", false); for(int ii = 0; ii < vs2.GetSize(); ii++) printf("%d: %s\n", ii+1, vs2[ii]); }
origin.h