Java SQL LocalDate toSqlDateNoInicio(LocalDate data)

Here you can find the source of toSqlDateNoInicio(LocalDate data)

Description

to Sql Date No Inicio

License

Open Source License

Declaration

public static java.sql.Date toSqlDateNoInicio(LocalDate data) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Date;

import org.joda.time.LocalDate;
import org.joda.time.LocalDateTime;

public class Main {
    public static java.sql.Date toSqlDateNoInicio(LocalDate data) {
        return toSqlDate(toDateNoInicio(data));
    }//  w  w w.jav a2  s.  c om

    public static java.sql.Date toSqlDate(Date data) {
        return new java.sql.Date(data.getTime());
    }

    public static Date toDateNoInicio(LocalDate data) {
        return data.toDateTimeAtStartOfDay().toDate();
    }

    public static Date toDate(LocalDateTime data) {
        return data.toDateTime().toDate();
    }
}

Related

  1. toLocalDate(java.sql.Date date)
  2. toLocalDate(java.util.Date d)
  3. toSqlDate(Date d)
  4. toSQLDate(DateMidnight dm)
  5. toSqlDate(LocalDate ld)
  6. transfer(java.util.Date date)