Created
June 13, 2020 17:25
-
-
Save ajaypro/ebc1bf54afa1d56e73b9b556f74cd864 to your computer and use it in GitHub Desktop.
string to date
This file contains 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
//string to date | |
fun main() { | |
var str = "2020-05-05" | |
val date = LocalDate.parse(str, DateTimeFormatter.ISO_DATE) | |
println(date) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment