docs: public static Date stringToDate(String strString, int ibScale) throws Exception
      {
          Date objData;
          Exception except = null;
          initGlobals();      // Make sure you have the utilities
          if ((strString == null) || (strString.equals(Constant.BLANK)))
              return null;
          for (int i = 1; i <= 6; i++)
          {
              DateFormat df = null;
              switch (i)
              {
              case 1:
                  df = gDateTimeFormat;break;
              case 2:
                  df = gDateShortTimeFormat;break;
              case 3:
                  df = gDateFormat;break;
              case 4:
                  df = gDateShortFormat;break;
              case 5:
              default:
                  df = gTimeFormat;break;
              case 6:
                  df= gGMTDateTimeFormat;break;
              }
              try   {
                  synchronized (gCalendar)
                  {
                      objData = df.parse(strString);
                      if (ibScale != -1)
                      {
                          DataConverters.gCalendar.setTime(objData);
                          if (ibScale == Constant.DATE_ONLY)
                          {
                              DataConverters.gCalendar.set(Calendar.HOUR_OF_DAY, 0);
                              DataConverters.gCalendar.set(Calendar.MINUTE, 0);
                              DataConverters.gCalendar.set(Calendar.SECOND, 0);
                              DataConverters.gCalendar.set(Calendar.MILLISECOND, 0);
                          }
                          if (ibScale == Constant.TIME_ONLY)
                          {
                              DataConverters.gCalendar.set(Calendar.YEAR, Constant.FIRST_YEAR);
                              DataConverters.gCalendar.set(Calendar.MONTH, Calendar.JANUARY);
                              DataConverters.gCalendar.set(Calendar.DATE, 1);
                          }
                          DataConverters.gCalendar.set(Calendar.MILLISECOND, 0);
                          objData = DataConverters.gCalendar.getTime();
                      }
                  }
                  return objData;
              } catch (ParseException ex)   {
                  except = ex;
                  // continue with the next parse
              }
          }
          if (except != null)
              throw except;
          return null;
      }