To find the year, month and day component of a DateTime variable: variable.year variable.month variable.day