Java SQL Time Create getTimeAndDateStamp(String line)

Here you can find the source of getTimeAndDateStamp(String line)

Description

get Time And Date Stamp

License

Apache License

Declaration

public static String getTimeAndDateStamp(String line) 

Method Source Code


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

import java.sql.Date;
import java.text.SimpleDateFormat;

import java.util.TimeZone;

public class Main {
    public static String getTimeAndDateStamp(String line) {
        Date unixTimeStamp = new Date(Long.parseLong(line.split(" ")[0]));
        SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd-MM-yy, hh:mm a z");
        sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
        return sdf.format(unixTimeStamp);
    }/*from w w w .jav  a2 s.c  o  m*/
}

Related

  1. getTime(Object value)
  2. getTime(Object value, int columnType)
  3. getTime(ResultSet resultSet, String columnName)
  4. getTime(ResultSet rs, String column)
  5. getTime(String time)
  6. getTimeBy(int hour)
  7. getTimeFormat()
  8. getTimeFromCalendar(final Calendar calendar)
  9. getTimeList(ResultSet resultSet, String columnName)