Question: I want to make a code wich reads from the keyboard a character and that character i want to add it to a string variable

Example

```
char c = sc.next().charAt(0);
String l = "";

```

[my character from keyboard beeing now in "c" and "l" beeing empty]

How can i make "l" to add to it's value the character from "c"

I want to make that "l" to stock all the char introduced so it needs to concatenate "l" with "c"...

Answer: 
You should use a `DatePicker` to allow the user to choose the when.

Time in Android is stored on a `long` (not an `int`). And the `long` time can easily be converted back and forth between `long` (always milli-seconds) and a `Date` object.

The `Date` object gives you all sorts of tools to compare before and after, look at months, minutes, hours, etc.

The current time is determined by:

```
long nowMs = System.currentTimeMillis();
int nowSec = (int)(nowMs / 1000);

```

There is also a very important `Calendar` object. This allows you to parse textual date formats as delivered by your http functions in and out of various dates.

For example:

```
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss Z");
String text = sdf.format(cal.getTime();

```

You will have to put all these tools together with a `DatePicker` example such as the one here [Create a DatePicker](http://developer.android.com/guide/topics/ui/controls/pickers.html) to complete your TV Guide application.

**Reference**:

* [Date](http://developer.android.com/reference/java/util/Date.html)
* [Calendar](http://developer.android.com/reference/java/util/Calendar.html)
* [DatePicker](http://developer.android.com/reference/android/widget/DatePicker.html)
EDIT : Check David's Answer its better.

First Filter the date selected with today's date. You can compare it by date.isbefore(date) or date.isafter(date) these booleans will let you tell know if a date is of past or future or present. then to further calculate the days inbetween you can make a method with switch statement that will basically convert the selected date and the current date into miliseconds(Date.getTimeinmiliseconds) 

if the date is of past take the difference of present time in miliseconds and past date in miliseconds. If the date is of future do the opposite. Take the difference and convert it to days difference with appropriate sign(negative/positive).

Please refer [this](https://stackoverflow.com/questions/3838527/android-java-date-difference-in-days) link for a better coding example