i want to get date from server i have tried below code but takes date from current system
, as i have run my application on different system it gives different result,because system date is different.
My code is:
String date = "yyyy-MM-dd";
Calendar calendar = Calendar.getInstance();
SimpleDateFormat dateFormat = new SimpleDateFormat(date);
System.out.println("Today Date = "+dateFormat.format(calendar.getTime()));
so i am expecting the resulting date from server, not from system as different system has different dates.
This would help you.
If you want the formatted date then