Android Time Format toModifiedTimeString(Date modified)

Here you can find the source of toModifiedTimeString(Date modified)

Description

to Modified Time String

License

Apache License

Declaration

public static String toModifiedTimeString(Date modified) 

Method Source Code

//package com.java2s;
/*//from   w  ww  . ja va 2  s  . com
 * Copyright 2010 Patrick Woodworth
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.util.Date;
import java.util.Locale;

public class Main {
    public static String toModifiedTimeString(Date modified) {
        long time = modified.getTime();
        double timed = time / 1000.0;
        String retval = String.format(Locale.ENGLISH, "%.2f", timed);
        //    Dbg.debug("TIME: " + retval);
        return retval;
    }
}

Related

  1. getFormattedTimeStamp(long millisSince1970)
  2. getRFC3339FormattedTime()
  3. get_current_date_time_format1_str()
  4. timeFormatToString(int paramInt)
  5. timeLongToHhmm(long timeMillis, DateFormat df)
  6. convertDateTime(String date)
  7. convertDateTime(long date)
  8. getTimeStr(long time)
  9. getTimeString(Date utcDate)