Java Date Create timeToDate()

Here you can find the source of timeToDate()

Description

time To Date

License

Open Source License

Declaration

public static String timeToDate() 

Method Source Code


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

import java.text.SimpleDateFormat;

import java.util.Calendar;
import java.util.Locale;

public class Main {
    public static String timeToDate() {
        Calendar cal = Calendar.getInstance();
        SimpleDateFormat dateParser = new SimpleDateFormat("MMM d HH:mm:ss", Locale.getDefault());
        return dateParser.format(cal.getTime());
    }//w  ww.  ja  v  a2  s.c o  m
}

Related

  1. date(int year, int month, int day, int hour, int minute)
  2. date(int year, int month, int day, int hour, int minute, int second)
  3. longArrayTODateArray(long[] dates_s, SimpleDateFormat dateformat)
  4. longToDate(long time)
  5. objectToDate(Object Obj)
  6. toDate()
  7. toDate()
  8. toDate(Calendar date)
  9. toDate(Date d)