Java SQL Time Create getSysDateTimeMillis()

Here you can find the source of getSysDateTimeMillis()

Description

get Sys Date Time Millis

License

Apache License

Declaration

public static String getSysDateTimeMillis() 

Method Source Code

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

import java.sql.Timestamp;

public class Main {

    public static String getSysDateTimeMillis() {
        String str = new Timestamp(System.currentTimeMillis()).toString();
        if (str.length() >= 23) {
            return str.substring(0, 23);
        } else {/*from   w w  w  .j  a  v a2 s  . co  m*/
            StringBuilder sb = new StringBuilder();
            sb.append(str);
            for (int i = 0; i < 23 - str.length(); i++) {
                sb.append("0");
            }
            return sb.toString();
        }
    }
}

Related

  1. getSqlTime(int hour, int minute, int second)
  2. getSQLTime(String timeString)
  3. getSQLTime(String value)
  4. getSQLTimeFromString(String s)
  5. getSqlTimeFromTimeNumber(int time)
  6. getSystemCurrentTimeMillis()
  7. getSystemTimeGMTToday()
  8. getSysTime()
  9. getThisWeekStartTime()