Java LocalDateTime Create toLocalDateTime(java.util.Date d)

Here you can find the source of toLocalDateTime(java.util.Date d)

Description

to Local Date Time

License

Apache License

Declaration

public static LocalDateTime toLocalDateTime(java.util.Date d) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.joda.time.LocalDateTime;

public class Main {
    public static LocalDateTime toLocalDateTime(java.sql.Timestamp ts) {
        // TODO - confirm this conversion always works, esp. across timezones
        LocalDateTime ldt = (ts == null ? null : LocalDateTime.fromDateFields(ts));
        return ldt;
    }//from  w w w .  j a  va  2 s  . c o m

    public static LocalDateTime toLocalDateTime(java.util.Date d) {
        // TODO - confirm this conversion always works, esp. across timezones
        LocalDateTime ldt = (d == null ? null : LocalDateTime.fromDateFields(d));
        return ldt;
    }
}

Related

  1. getLocalDateTimeFromEpochMilli(long epochMillis)
  2. getLocalDateTimeFromMillis(final long millis)
  3. getLocalDateTimeFromMillis(long millis)
  4. localDateTime(Date date, Clock clock)
  5. localDateTimeOf(final String value)
  6. toLocalDateTime(long systemMillis)