Skip to content

Instantly share code, notes, and snippets.

@Lzyct
Created September 20, 2019 15:05
Show Gist options
  • Select an option

  • Save Lzyct/6d8f9ea03b47260c31d800dc593fbab3 to your computer and use it in GitHub Desktop.

Select an option

Save Lzyct/6d8f9ea03b47260c31d800dc593fbab3 to your computer and use it in GitHub Desktop.
Date Format for timestampz
//date format for timestampz
val formatInput = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
val formatOutput = "dd MMMM yyyy HH:mm:ss"
val sdfInput = SimpleDateFormat(formatInput, Locale("id", "ID"))
val sdfOutput = SimpleDateFormat(formatOutput, Locale("id", "ID"))
val date = sdfInput.parse(dataHome.apraisTime)
val newOutput = sdfOutput.format(date)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment