2
I have a table book that has a column like "Date" and in my java code I have a field like "localdate". I need to save the data from the "Localdate" field in the table but I’m finding it difficult to do this, any suggestions?
Java:
package servico;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import model.Livro;
public class LivroService {
private List<Livro> listaLivros;
SimpleDateFormat sdt = new SimpleDateFormat("dd-MM-yyyy");
public LivroService() {
listaLivros = new ArrayList<>();
listaLivros.add(new Livro(1,123456,"Harry Potter","J.K Rowling","HP",sdt.format("12-10-2015")));
}
}
Related question: https://answall.com/q/177129/132
– Victor Stafusa
@Victorstafusa thanks for responding but I even know how to make the conversion, what I do not know how to save in the comic.
– Malfus