Java Utililty Methods Parse Date Pattern YYYY

List of utility methods to do Parse Date Pattern YYYY

Description

The list of methods to do Parse Date Pattern YYYY are organized into topic(s).

Method

longparse(String string)
parse
return parse(string, ISO_DATETIME_FORMAT);
Dateparse(String string)
Convert a string to date format
if (string == null)
    return null;
string = string.trim();
if (string.equals("unknown") || string.equals(""))
    return null;
try {
    if (!"".equals(string)) {
        SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
...
Dateparse(String stringData)
parse
final DateFormat fmt;
if (stringData.endsWith("Z")) {
    fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
} else {
    fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
try {
    return fmt.parse(stringData);
...
Dateparse(String text)
This method tries several different formats to parsing a date.
for (String formatString : formatStrings) {
    try {
        return new SimpleDateFormat(formatString).parse(text);
    } catch (ParseException e) {
return null;
Calendarparse(String text)
Parses a ISO8601-compliant date/time string.
String tzID = "GMT"; 
int tzPos = text.indexOf('Z');
if (tzPos == -1) {
    tzPos = text.indexOf('+');
    if (tzPos == -1) {
        tzPos = text.indexOf('-', 8);
    if (tzPos == -1) {
...
Dateparse(String time)
parse
if (time == null || time.isEmpty())
    return null;
try {
    return dayTime.parse(time);
} catch (Exception ex) {
try {
    return day.parse(time);
...
Dateparse(String time, String df)
Parse to GMT date
return parse(time, df, null);
Dateparse1(String DateString, String dateTimeSeparator)
Attempts to parse a date string with various formats including "- ,/, and ."
Date Result;
SimpleDateFormat fmt = new SimpleDateFormat();
fmt.setLenient(true);
String Date_formats[] = { "yyyy", "yyyy-MM", "yyyy-MM-dd", "yyyy.MM.dd", "yy-MMM-dd", 
        "yyyy-M-d", "yyyy.M.d", "yy.MM.dd", "yy.N.d", "MM/dd/yyyy", "MM/dd/yy", "M/d/yyyy", "M/d/yy",
        "MMM/dd/yyyy", "MMM/d/yyyy", "MMM/dd/yy", "MMM/d/yy", "MMM dd/yyyy", "MMM d/yyyy", "MMM dd/yy",
        "MMM d/yy", "dd-MMM-yyyy", "dd/MMM/yyyy", "dd-MMM-yy", "d/MMM/yy", "MMM dd,yy" };
String Time_formats[] = { "HH:mm:ss", "HH:mm", "hh:mm a", "hh:mma", "H:mm:ss", "H:mm", "h:mm a", "h:mma",
...
Stringparse2DateString(String date)
parse Date String
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Date d = null;
try {
    d = df.parse(date);
} catch (ParseException e) {
    e.printStackTrace();
return df.format(d);
...
Objectparse_default(String time)
parsdefault
try {
    return FORMATER_3.parseObject(time);
} catch (ParseException e) {
    e.printStackTrace();
return null;