Skip to content

Tag Archives: Java-SimpleDateFormat

Given the day, month, and year, the task is to find the corresponding day of the week using SimpleDateFormat class in Java. Examples Input: 11-08-2020… Read More
Given a date in GregorianCalendar format change it into SimpleDateFormat.Examples:  Input: Sat Apr 28 13:36:37 UTC 2018 Output: 28-Apr-2018 Input: Wed Apr 03 20:49:45 IST… Read More
The toLocalizedPattern() Method of SimpleDateFormat class is used to return a localized pattern formatted string describing this date format. In other words a particular date… Read More
The format() Method of SimpleDateFormat class is used to format a given date into Date/Time string. Basically the method is used to convert this date… Read More
The applyPattern() Method of SimpleDateFormat class is used to set a given defined pattern to the Date Format. It simply converts a particular date and… Read More
The getDateFormatSymbols() Method of SimpleDateFormat class is used to return the copy of the date and time format symbols. Syntax: public DateFormatSymbols getDateFormatSymbols() Parameters: The… Read More
The applyLocalizedPattern() Method of SimpleDateFormat class is used to apply a localized string pattern to this date format. This pattern can be set by the… Read More
The clone() Method of SimpleDateFormat class is used to create a copy of the SImpleDateFormat. It creates another copy of this SimpleDateFormat. Syntax: public Object… Read More
The setDateFormatSymbols() Method of SimpleDateFormat class is used to set the date and time format symbols of this date format. Syntax: public void setDateFormatSymbols(DateFormatSymbols newFormatSymbols)… Read More
The hashCode() Method of SimpleDateFormat class is used to return the hash code value of this SimpleDateFormat object. The hash code is of integer type.… Read More
The equals() Method of SimpleDateFormat class is used to compare two SimpleDateFormat objects. The method returns True if this SimpleDateFormat is equal to the passed… Read More
The get2DigitYearStart() Method of SimpleDateFormat class is used to return the start of 100 year period that was set during parsing or set2DigitYearStart() method. It… Read More
The toPattern() Method of SimpleDateFormat class is used to return the pattern of the date format. Syntax:   public String toPattern() Parameters: The method does not… Read More
The parse() Method of SimpleDateFormat class is used to parse the text from a string to produce the Date. The method parses the text starting… Read More
The set2DigitYearStart() Method of SimpleDateFormat class is used to set the 100-year period 2-digit years and interpret the same as being in to begin on… Read More

Start Your Coding Journey Now!