Java Format LocalDateTime to String

Descripción

Format LocalDateTime to String


File Template: ❌


Prefix

localdatetime:format


Scopes

java


Snippet de código

DateTimeFormatter formatter = DateTimeFormatter.ofPattern("${1|yyyy-MM-dd HH:mm,yyyy-MM-dd HH:mm:ss,dd/MM/yyyy HH:mm,dd/MM/yyyy HH:mm:ss,MM/dd/yyyy HH:mm,MM/dd/yyyy HH:mm:ss|}");
String ${2:formattedDateTime} = ${3:dateTime}.format(formatter);