I have a String which contains date in the format dd/mm/yyyy.
For example lastDate = "1/2/2012" -> I get this date from date picker dialog. Now I have questions for this . I need to add 0 infront of date or month , if it is single digit . after the operation my date should be 20120201 ,any how I have done removing the delimeters and reversing the string , but I am stuck up , In adding 0 for day or month , if they are less than 10 , or single digit.
I have a String which contains date in the format dd/mm/yyyy . For example
Share
If you use
DatePickerthen you get year, month and day as ints. So to build desired string you can useString.format: