Please refer following CP Article:
Formatting a DateTime for display - format string description[
^]
also refer
DateTime.Parse Method (String)[
^]
or else
You can parse user input like this:
DateTime enteredDate = DateTime.Parse(enteredString);
If you have a specific format for the string, you should use the other method:
DateTime loadedDate = DateTime.ParseExact(loadedString, "d", null);
"d"
stands for the short date pattern (see
MSDN[
^] for more info) and null specifies that the current culture should be used for parsing the string.
[EDIT]
For Java:
Please refer following threads:
Convert String to Date[
^]
JavaScript Date Format[
^]
JavaScript Data Object Examples:
Javascript Convert String to Date[
^]
Have a look on this
Similar discussion[
^]
Hope it helps!