The convertDateToDays() method

The convertDateToDays() method converts java.sql.Date to an int data type that encodes the number of days since January 1, 1900 as 1. Dates earlier than January 1, 1900 are encoded as negative numbers.

Method signature

public static int convertDateToDays (java.sql.Date dt)

Input parameter

dt
The java.sql date.