Java Date String Format formatDate(String fieldName)

Here you can find the source of formatDate(String fieldName)

Description

format Date

License

Apache License

Declaration

@Deprecated
    public static String formatDate(String fieldName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    @Deprecated
    public static String formatDate(String fieldName) {
        return String.format(
                "(trim(str(year(%1$s))) "
                        + "|| '-' || (case when month(%1$s) < 10 then '0' else '' end) || trim(str(month(%1$s))) "
                        + "|| '-' || (case when day(%1$s) < 10 then '0' else '' end) || trim(str(day(%1$s))))",
                fieldName);//from w w  w.java2 s. c o m
    }
}

Related

  1. formatDate(String date)
  2. formatDate(String date)
  3. formatDate(String date)
  4. formatDate(String date, int format)
  5. formatDate(String dateString, String delimiter)
  6. FormatDate(String strDate, char DateSeparator)
  7. formatDate(String unformattedDate, String format)
  8. formatDate(String values)
  9. FormatDate6(String strDate)