I have simple calender function which gets the the current date time. I want to convert the Date to unix time stamp format before passsing it as json.
my code :
SimpleDateFormat s = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss");
final String format = s.format(new Date());