By increasing use of very small structures, thin films, functionally graded materials, nanocomposites, and heterogeneous surfaces in various engineering areas the conventional tensile and compression tests cannot be readily used for measurement of the viscoelastic relaxation modulus and creep compliance of such materials. Recent developments in the indentation contact analysis for viscoelastic bodies, an exact evaluation of relaxation and creep characteristics of viscoelastic solids has been prepared to use the nanoindentation. In this paper, after representing the measurement methods of elastic properties for the polymeric films and layers, a powerful mathematical approach, based on contact mechanics, was developed to describe viscoelastic characteristics directly by using the novel nanoindentation technique. Independently, a constant-rate displacement and a constant-rate loading histories were used to measure the creep compliance and relaxation modulus from nanoindentation tests, respectively. The viscoelastic moduli, using the viscoelastic contact theories, have been extracted to the nanoindentation load-displacement data. A generalized Maxwell model and a generalized Kelvin model were used to describe the creep and the relaxation constitutive behaviors of viscoelastic layers, respectively.