public static
	java.util.Date[] toArrayOfDate(Collection collection)
	{
		if(collection == null || collection.size() == 0) return new java.util.Date[0];
		java.util.Date[] aResult = new java.util.Date[collection.size()];
		int i = 0;
		Iterator iterator = collection.iterator();
		while(iterator.hasNext()) {
			Object oValue = iterator.next();
			if(oValue instanceof java.sql.Date) {
				aResult[i++] = new java.util.Date(((java.sql.Date) oValue).getTime());
			}
			else
			if(oValue instanceof java.sql.Timestamp) {
				aResult[i++] = new java.util.Date(((java.sql.Timestamp) oValue).getTime());
			}
			else
			if(oValue instanceof java.util.Date) {
				aResult[i++] = (java.util.Date) oValue;
			}
			else
			if(oValue instanceof java.util.Calendar) {
				aResult[i++] = ((java.util.Calendar) oValue).getTime();
			}
			else
			if(oValue instanceof String) {
				String sDate = WUtil.normalizeStringDate((String) oValue);
				if(sDate == null) return null;
				aResult[i++] = new java.util.Date(WUtil.stringToLongDate(sDate));
			}
			else {
				return null;
			}
		}
		return aResult;
	}