OffsetDateTime toLocalDateTime()
gets the
LocalDateTime part of this offset date-time.
toLocalDateTime
has the following syntax.
public LocalDateTime toLocalDateTime()
The following example shows how to use toLocalDateTime
.
import java.time.LocalDateTime; import java.time.OffsetDateTime; //w ww .ja v a 2 s . c o m public class Main { public static void main(String[] args) { OffsetDateTime o = OffsetDateTime.now(); LocalDateTime l = o.toLocalDateTime(); System.out.println(l); } }
The code above generates the following result.