Here you can find the source of getFormattedValue(Object customFieldValue)
Parameter | Description |
---|---|
customFieldValue | to format |
public static String getFormattedValue(Object customFieldValue)
//package com.java2s; //License from project: BSD License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**//ww w . j a v a 2 s. c o m * Get a formatted value as pattern "dd/MMM/yy" * if the value is instance of Date * @param customFieldValue to format * @return formatted value */ public static String getFormattedValue(Object customFieldValue) { String cfValue = ""; if (customFieldValue instanceof Date) { SimpleDateFormat sdf = new SimpleDateFormat("dd/MMM/yy"); Date date = (Date) customFieldValue; cfValue = sdf.format(date).toString(); } else { cfValue = customFieldValue.toString(); } return cfValue; } }