Java Long to long2Date(Long date, String interval)

Here you can find the source of long2Date(Long date, String interval)

Description

long Date

License

Open Source License

Declaration

public static final String long2Date(Long date, String interval) 

Method Source Code

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

public class Main {
    private StringBuffer sb = null;

    public static final String long2Date(Long date, String interval) {
        String line = String.valueOf(date);
        if (line.length() != 8) {
            return null;
        } else {//w  w  w  .  j a va  2 s  .co  m
            StringBuffer buf = new StringBuffer(10);
            buf.append(line.substring(0, 4));
            buf.append(interval);
            buf.append(line.subSequence(4, 6));
            buf.append(interval);
            buf.append(line.substring(6, 8));
            return buf.toString();
        }

    }

    public void append(String str) {
        sb.append(str);
    }
}

Related

  1. long2Arr(long var, byte[] arrayBytes, int startIndex)
  2. long2array(int sz, long seed)
  3. long2buff(long n)
  4. long2char(long x)
  5. long2dotted(long address)
  6. long2FourChars(long i)
  7. Long2H(final long l)
  8. long2leb(final long x, final byte[] buf, final int offset)