Set date method.