Well, I'm having some trouble separating parts of the date through bitwise operations.
date format: yyyy-dd-mm
int menor_data(int date1, int date2)
{
int day1 = (date1 >> 8) & 0xff;
int month1 = date1 & 0xff;
int year1 = (date1 >> 16) & 0xff;
int day2 = (date2 >> 8) & 0xff;
int month2 = date2 & 0xff;
int year2 = (date2 >> 16) & 0xff;
}
The problem is that when I do print for example of year1 it has nothing to do with date year 1. I think I am making confusion because the dates are in base 10 and the mask is in base 16