Java Long Number to Date toYMDHMSM(long tm)

Here you can find the source of toYMDHMSM(long tm)

Description

to YMDHMSM

License

Open Source License

Declaration

public static long toYMDHMSM(long tm) 

Method Source Code


//package com.java2s;
/*/*  w w  w  .  j av  a2  s .co  m*/
Copyright 2011 Northbranchlogic, Inc.
    
This file is part of Parallel Processing with EC2 (ppe).
    
ppe is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
    
ppe is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
    
You should have received a copy of the GNU General Public License
along with ppe.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.text.*;
import java.util.*;

public class Main {
    public static long toYMDHMSM(long tm) {
        return (Long.parseLong((new SimpleDateFormat("yyyyMMddHHmmssSSS")).format(new Date(tm))));
    }
}

Related

  1. getDateByLongTime(long time)
  2. getDateByMis(long m)
  3. getDateByMisSecond(long misSecond)
  4. minsSecsFromMs(long ms)
  5. secToDate(long secs, String format)