Java String to Time getTime(String file)

Here you can find the source of getTime(String file)

Description

get Time

License

Apache License

Declaration

public static String getTime(String file) 

Method Source Code

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

import java.io.File;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getTime(String file) {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(new File(file).lastModified()));
    }// w w  w. ja  v  a2  s  . c  om
}

Related

  1. getStringWithTime(String str)
  2. getSystemTime(String pattern)
  3. getTime(String date)
  4. getTime(String date, String pattern)
  5. getTime(String dateTimeString)
  6. getTime(String parrten)
  7. getTime(String pattern)
  8. getTime(String pattern)
  9. getTime(String s)