How to Convert Current Timestamp with millisecond to Epco.
I have Json array of Object, that object does not have an unique value So i was trying to get the Current Timestamp with Milliseconds and Convert to EPCO and Add in the Each a new node in each object.
The Below Code is not returning the unique value.
I referred this Link Converting from DateTime to Epoch - and back
Datetime dt = DateTime.getTime() ;
system.debug('Datetime ' + dt);
Long l = Datetime.now().getTime().millisecond();
system.debug('Long ' +l);
system.debug(DateTime.newInstance(l));
Datetime dt1 = DateTime.getTime() ;
system.debug('Datetime ' + dt1);
Long l1 = Datetime.now().getTime()();
system.debug('Long ' +l1);
system.debug(DateTime.newInstance(l1));