Questions tagged [android-dateutils]

51 questions
0
votes
2 answers

How to omit 0 in a whole number Date string

I have successfully changed the format of a date string from yyyy-MM-dd to MM/dd. Now the problem is that if the month and day values are less than 10 each, the format should be for example 2/7 and not 02/07. How do I do this? Here's my code: …
Compaq LE2202x
  • 2,030
  • 9
  • 45
  • 62
0
votes
1 answer

converting timestamp to relative time in android

Timestamp which I use is in the format "YYYY-MM-DD HH:MM:SS" now I want it to convert it into corresponding relative time . Have searched a lot on this topic . I know DateUtils can be used to do this , but I cannot find any method in DateUtils that…
Ashwani
  • 1,574
  • 14
  • 28
-1
votes
3 answers

How to show the Calender of only one year from current date in Android?

I want that the calender show user only one year date and rest will be disabled for the past it is working fine .But now i want to make so that the user can select only one year calender from current date.here is my code .Please suggest me the…
Developer
  • 6,292
  • 19
  • 55
  • 115
-2
votes
2 answers

How can I Convert timestamp String to Date in Android

I want to convert timestamp to date in android, I tried this code but not get expected result. My Code Is. String timeStampST = "2016-12-13 09:47:11"; SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); Date convertedDate = new…
byteC0de
  • 5,153
  • 5
  • 33
  • 66
-2
votes
6 answers

android date format: how to get the format from string

I am getting this 14-03-2014 09:02:10 string from JSON. All is OK but I want just the date part in this string not the time (14-03-2014). So how can I convert the string to this format.
Abid Khan
  • 2,451
  • 4
  • 22
  • 45
-3
votes
2 answers

Convert date into "17. December 2015" Format

I am getting date in form of "20150119" and I want to convert it into the format like: "19. January 2015" . How can I convert date in such format. I tried below code: private void convertDate() { String m_date = "20150119"; …
GrIsHu
  • 29,068
  • 10
  • 64
  • 102
1 2 3
4