get Day from java.sql.Date - Java java.sql

Java examples for java.sql:Date

Description

get Day from java.sql.Date

Demo Code


//package com.java2s;

import java.sql.Date;

import java.time.LocalDate;

public class Main {
    public static int getDay(Date date) {
        LocalDate localDate = date.toLocalDate();

        return localDate.getDayOfMonth();
    }/*from   www .  j a  v a 2  s . c om*/
}

Related Tutorials