Language/Kotlin
2021 - 04 - 21, Kotlin 현재 날짜 구하기
Cs.Woo
2021. 4. 26. 01:35
import java.text.SimpleDateFormat
fun getNowDateStr():String{
val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
return dateFormat.format(System.currentTimeMilis())
}
- 코틀린에서 현재 날짜를 구하는 함수