[#Blogged]Day, Month and Year from Date

Sample Code (Use this in apex class):

Date gettingdate;
Integer dy = gettingdate.day();
Integer monh = gettingdate.month();
Integer yer = gettingdate.year();