I have two strings:
String date = "2011-11-11"
String time="11:00 PM"
i want to merge this date and time and convert them into a long, similar to System.currentTimeMillis().
I have two strings:
String date = "2011-11-11"
String time="11:00 PM"
i want to merge this date and time and convert them into a long, similar to System.currentTimeMillis().
Use SimpleDateFormat and parse the String into a Date. When you have Date you can get .getTime() what's a long
http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html
NOT TESTED!!
I found this SO post in the same lines.
try this it is working fine