I am trying to use to insert a date to my sqlite database.
public CardHolder(String firstName, String lastName, String barcodeNb,
Date dateOfBirth,Date expiryDate)
Where I initiated this instance in the mainActivity
CardHolder person1 =new CardHolder("John","example","123123",new
java.sql.Date(1993,9,3),new java.sql.Date(1993,9,3));
But it shows that java.sql.Date is deprecated, what should I use instead?
new java.sql.Date(60707833200000L)produces an object which is equal tonew java.sql.Date(1993,9,3); it is just a different method of construction. It is worth noting thatnew java.sql.Date(1993,9,3)does not do what you think it does.. You should read the javadoc