Created
September 20, 2019 15:05
-
-
Save Lzyct/6d8f9ea03b47260c31d800dc593fbab3 to your computer and use it in GitHub Desktop.
Date Format for timestampz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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