An IC-compatible linear variable optical filter (LVOF) for application in the UV spectral range between 310 and 400 nm has been fabricated using resist reflow and an optimized dry-etching. The LVOF is mounted on the top of a commercially available CMOS camera to result in a UV microspectrometer. A special calibration technique has been employed that is based on an initial spectral measurement on a xenon lamp. The image recorded on the camera during calibration is used in a signal processing algorithm to reconstruct the spectrum of the mercury lamp and the calibration data is subsequently used in UV spectral measurements. Experiments on a fabricated LVOF-based microspectrometer with this calibration approach implemented reveal a spectral resolution of 0.5 nm.