I want to convert my input into a timestamp value.
I have only found a dateconverter in examples. Are there any best practises?
Thank you
Update:
I want to save a birthday of a user but my backend requires a timestamp value. And I have problems with binding it to my jsf frontend..
Maybe a link to an example would be helful :-)
I tried it as follows:
public void setBday(Date bday) {
member.setBirthday(new Timestamp(bday.getTime()));
}
public Timestamp getBday() {
return member.getBirthday();
}
But I get exceptions (strange):
/createMember.xhtml @34,54 value="#{member.bday}": Cannot convert 13.01.83 01:00 of type class java.util.Date to class java.sql.Timestamp
(Is it maybe because of get method?)