[JAVA] [Kotlin] Convert ZonedDateTime to String by specifying the format

The point is to use ʻuuuuinstead ofyyyy`

fun ZonedDateTime.format(): String =
    format(DateTimeFormatter.ofPattern("uuuu/MM/dd HH:mm"))

Recommended Posts

[Kotlin] Convert ZonedDateTime to String by specifying the format
# 1_JAVA I want to get the index number by specifying one character in the character string.
Convert String type to Timestamp type
Convert to Ruby Leet string
When the character string passed to C ++ by JNA is garbled
Convert ruby object to JSON format
I want to convert InputStream to String
Convert iso-2022-jp character string to utf-8
[Java] How to convert from String to Path type and get the path
[Android] Convert Android Java code to Kotlin
How to get the current date as a string in yyyyMMdd format
[Java] Output by specifying the format with printf% s,% d,% f [Format specifier]
[Swift] Copy the character string to the clipboard
Convert all Android apps (Java) to Kotlin
[Java] Convert Object type null to String type
How to convert java.util.Date, java.sql.Date, LocalDate, ZonedDateTime
I will absolutely convert the time string!
<Java> Quiz to batch convert file names separated by a specific character string with a part of the file name
[swift5] How to transition from the app to an external site by specifying the URL
I was swallowed by the darkness of the romaji, trying to convert my name to romaji
Format the date and time given by created_at
Convert to a tag to URL string in Rails
Convert from C String pointer to Swift String type
[Android] How to convert a character string to resourceId
Create an app by specifying the Rails version
Convert Java nested beans to aaa.bbb [0] .ccc format
How to write Java String # getBytes in Kotlin?