Java Milliseconds toSpacelessDateString(long millisSinceEpoch)

Here you can find the source of toSpacelessDateString(long millisSinceEpoch)

Description

to Spaceless Date String

License

Open Source License

Declaration

public static String toSpacelessDateString(long millisSinceEpoch) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.Locale;

public class Main {
    public static String toSpacelessDateString(long millisSinceEpoch) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HHmmss",
                Locale.US);//from w w  w. j a va 2 s . c o m
        Date t = new Date(millisSinceEpoch);
        return sdf.format(t);
    }
}

Related

  1. timestampToString(long lastModifiedMillis)
  2. timeToMilliseconds(Object unit, long interval)
  3. timeToString(long timeMillis)
  4. timeToTag(long milliSeconds)
  5. toMillis(String ts)
  6. ToSting(Long milliSecond)
  7. toTime(long milli)
  8. truncateMillisecond(Date date)
  9. trySleepMillis(int millis)