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 {
    private static SimpleDateFormat serverSideDateFormator = null;

    public static long convertInMillisecond(String dateStrServer) {

        //String orderDate = null;
        try {
            Date date = serverSideDateFormator.parse(dateStrServer);
            return date.getTime();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return 0;
    }
}