I have to an android application in which I need to convert the current date to the number of seconds passed since 1970.
What I am doing currently i
//long currentTimeMillis ()-Returns the current time in milliseconds. long millis = System.currentTimeMillis(); //Divide millis by 1000 to get the number of seconds. long seconds = millis / 1000;