Code example for SimpleDateFormat

Methods: toPattern

  public String getFormatString()
    if (getFormat() instanceof SimpleDateFormat)
      final SimpleDateFormat decFormat = (SimpleDateFormat) getFormat();
      return decFormat.toPattern();
    return null; 
   * Defines the format string of the used date format. This method will replace the date format instance of this 
   * factory. If the format string is null, the default format string of the current locale is used. 
   * @param formatString the formatstring of the date format instance. 
  public void setFormatString(final String formatString)
    if (formatString == null)
Stop searching for code, let great code find you!  Add Codota to your java IDE