Java Time Format formatTimestampStart(String timestamp)

Here you can find the source of formatTimestampStart(String timestamp)

Description

Formats timestamp value to be 13 digits long

License

Apache License

Parameter

Parameter Description
timestamp string value representing a timestamp value

Return

timestamp value that is 13 digits long

Declaration

public static String formatTimestampStart(String timestamp) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*from ww  w.j a  v a 2s  .com*/
     * Formats timestamp value to be 13 digits long
     * 
     * @param timestamp
     *            string value representing a timestamp value
     * @return timestamp value that is 13 digits long
     */
    public static String formatTimestampStart(String timestamp) {

        if (timestamp != null && timestamp != "")
            timestamp = String.format("%013d", Long.parseLong(timestamp));
        return timestamp;
    }
}

Related

  1. formatTimeSpanForScheduler(long time)
  2. formatTimestamp(String timestamp)
  3. formatTimestampEnd(String timestamp)
  4. formatTimestampForFilename(final long timestamp)
  5. formatTimestampForLogging(final long rawNanosTimestamp)
  6. formatTimeStep(Integer numberOfTimestepsPerYear, int stepNumber)
  7. formatTimeString(long millisecond)
  8. formatTimeString(String time)
  9. formatTimeTakenNs(long startTimeNs, String message)