My below function doesn't cast the date to the defined format.
val oldFormat= new SimpleDateFormat("yyyy-MM-dd-HH.mm.ss.SSSSSS")
val newFormat= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SSSSSS",Locale.ENGLISH)
newFormat.format(oldFormat.parse(s).getTime))
Input date is in format yyyy-MM-dd-HH.mm.ss.SSSSSS, need to convert that into yyyy-MM-dd hh:mm:ss.SSSSSS.
my input is 2019-10-08-03.57.14.694695 but the above code outputs to 2019-10-08 04:15:04.000695 what am I doing wrong here