Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getDFDateString(String timeStamp) {

        try {
            SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy @ H:mm");
            Date date = new Date(Long.parseLong(timeStamp) * 1000);

            return dateFormat.format(date);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return "";
    }
}