Package java.text

Examples of java.text.SimpleDateFormat.format()


            String filename = (part.getFileName() != null) ? (String)part.getFileName() : "Part-" + i;

            // prepend human readable date to the fileName. This is for uniqueness.
            SimpleDateFormat df = new SimpleDateFormat("MMMM_dd_yyyy_hh_mm_ss_S");
            String prependDate = df.format(new Date());
            attachment.setName(prependDate + "-" + filename);
            attachment.setTitle(filename);
            attachment.setOwner(ownerID);
            attachment.setAuthorId(ownerID);
            attachment.setCreatedBy(ownerID);
View Full Code Here


      }
            String filename = (part.getFileName() != null) ? (String)part.getFileName() : "Part-" + i;

            // prepend human readable date to the fileName. This is for uniqueness.
            SimpleDateFormat df = new SimpleDateFormat("MMMM_dd_yyyy_hh_mm_ss_S");
            String prependDate = df.format(new Date());
            String storedFileName = prependDate + "-" + filename;
            attachment.setName(storedFileName);
            attachment.setTitle(filename);
      attachment.setOwner(ownerID);
            attachment.setAuthorId(ownerID);
View Full Code Here

    entityForm.set("entityName", this.getName());
    entityForm.set("marketingListId", new Integer(this.getList()));
    String modified = "";
    SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy ");
    if (this.getModifiedOn() != null) {
      modified = sdf.format(this.getModifiedOn());
    }
    if (this.getModifiedByName() != null) {
      modified += this.getModifiedByName();
    }
    entityForm.set("modified", modified);
View Full Code Here

      modified += this.getModifiedByName();
    }
    entityForm.set("modified", modified);
    String created = "";
    if (this.getCreatedOn() != null) {
      created = sdf.format(this.getCreatedOn());
    }
    if (this.getCreatedByName() != null) {
      created += this.getCreatedByName();
    }
    entityForm.set("created", created);
View Full Code Here

            Timestamp lastModified = (Timestamp) note.get("lastModified");
            String userName = (String) note.get("userName");

            // format date as string
            SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss a");
            String dateString = dateFormatter.format(lastModified);

            // create delimiter
            String delimiter = "----# " + noteID.toString() + " - " + userName + " - " + dateString + " #----\n";

            // append content
View Full Code Here

        SimpleDateFormat dForm = new SimpleDateFormat(dateFormat);
        dForm.setCalendar(gCal);

        Timestamp ts = (Timestamp)hm.get("Created");

        String createdDt = dForm.format(ts);

        ts = (Timestamp)hm.get("Modified");

        String modifiedDt = dForm.format(ts);
        // By Shilpa ends here
View Full Code Here

        String createdDt = dForm.format(ts);

        ts = (Timestamp)hm.get("Modified");

        String modifiedDt = dForm.format(ts);
        // By Shilpa ends here

        proposallistform.setCreatedDate(createdDt);
        proposallistform.setModifyDate(modifiedDt);
        if (hm.get("Billing") != null) {
View Full Code Here

        }
        body.append("Details: " + details + "\n\n");
        SimpleDateFormat dateFormatter = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
        Timestamp startDateTime = basicActivityVO.getActivityStartDate();
        if (startDateTime != null) {
          String startDate = dateFormatter.format(startDateTime);
          body.append("Start: " + startDate + "\n");
        }
        Timestamp endDateTime = basicActivityVO.getActivityEndDate();
        if (endDateTime != null) {
          String endDate = dateFormatter.format(endDateTime);
View Full Code Here

          String startDate = dateFormatter.format(startDateTime);
          body.append("Start: " + startDate + "\n");
        }
        Timestamp endDateTime = basicActivityVO.getActivityEndDate();
        if (endDateTime != null) {
          String endDate = dateFormatter.format(endDateTime);
          body.append("End: " + endDate + "\n");
        }
        body.append("Creator: " + basicActivityVO.getOwnerName() + "\n\n");
        MailMessageVO mailMessageVO = new MailMessageVO();
        mailMessageVO.setFromAddress(fromAddress);
View Full Code Here

      individualForm.set("sourceId", new Integer(this.getSource()));
    }
    String modified = "";
    SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy ");
    if (this.getModifiedOn() != null) {
      modified = sdf.format(this.getModifiedOn());
    }
    if (this.getModifiedByName() != null) {
      modified += this.getModifiedByName();
    }
    individualForm.set("modified", modified);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.