Code example for Timestamp

Methods: getTime

    public Timestamp createDate;
    public Timestamp editDate;
    public Date getPurchaseDate4Date(){
        return new Date(purchaseDate.getTime());
    public Date getCreateDate4Date(){
        return new Date(createDate.getTime());
    public Date getEditDate4Date(){
        try { 
            Timestamp object = new Timestamp(new SimpleDateFormat("yyyy/MM/dd").parse("2006/10/10").getTime());
        } catch (ParseException e) {
            // TODO Auto-generated catch block 
        return new Date(editDate.getTime());
Connect your IDE to all the code out there  Get Codota for Java