Measurements of coherent diffraction radiation from a slit of variable width generated by short electron bunches were performed in millimeter and submillimeter ranges. Experimental data are compared with the transition radiation case and theoretical predictions. A more realistic description than the conventional theory is necessary to account for the data correctly. No noticeable difference in the estimated bunch length was observed using diffraction radiation in a wide range of slit widths and transition radiation.