So I am having trouble assigning multiple variables to one variable.
I have a date picker and time picker in my application and the values that the user picks are stored as separate variables. I then want to take all of the variables and assign them to one variable so I can store the users input and use it publicly in other activities.
EDIT: so I am working with a third party library that uses animated graphs and to generate the graph I must pass through integers. So after trying out all your suggestions this it is working using the Gregorian way:
timeselected = new GregorianCalendar(yearNow, monthNow, dayNow, hourNow, minuteNow).getTime();
Only thing now is this is stored as a date and cannot be cast to an integer??
For example, here is what I have tried so far:
The variables that I use to store the picker selection are:
int dayNow, monthNow, yearNow, hourNow, minuteNow;
I have tried to assign them to one variable like so:
timeselected = (yearNow) + (monthNow) + (dayNow) + (hourNow) + (minuteNow);
Although this is giving me a total of all the variables added up. e.g. year(2017) plus month(11) etc.
Does anyone know how I can get this to store the selected data (which should be a date format) as an Integer?
Thanks