Showing posts with label format time in android. Show all posts
Showing posts with label format time in android. Show all posts

Thursday, March 5, 2015

Convert date in hours ago or days ago in android

When you see a post it always shows time posted in hours ago or days ago. If you are also kooing to implement the same functionality using Android than use the below method that convert date or time in " hours or days".

//firstly find out difference between current time and other time
 long diff = currentdate.getTime() - temp_date.getTime();


Don't lose faith when you see others receive answers to their prayers

An elephant and a dog became pregnant at same time. Three months down the line the dog gave birth to six puppies . Six months later the ...

 

G-Expo Template by Ipietoon Cute Blog Design