It's something basic but I'm stuck in this conversion of dates:
I receive a date in String
with format
10/19/2017
and I have to convert them into epoch for this I do:
Date dataObjUntil = null;
SimpleDateFormat sdf = new SimpleDateFormat("dd/mm/yyyy");
try {
dataObjUntil = sdf.parse(untilDate);
} catch (ParseException e) {
Log.i("error", e.getMessage());
}
long segundos = dataObjUntil.getTime()/1000
but I get
1484781000
what is
Thursday, January 19, 2017 0:10:00
Can someone tell me what I'm wrong about? , I'm not interested in using libraries type JodaTime
since I only have to do this operation