Here you can find the source of convertTimestampToDDMMMMYYYY(Timestamp dateTime)
Parameter | Description |
---|---|
dateTime | a parameter |
public static String convertTimestampToDDMMMMYYYY(Timestamp dateTime)
//package com.java2s; //License from project: LGPL import java.sql.Timestamp; public class Main { /**/*from w w w .j a va 2 s . c om*/ * convert timestamp to format dd MMMM yyyy * @param dateTime * @return String */ public static String convertTimestampToDDMMMMYYYY(Timestamp dateTime) { String s = ""; java.text.SimpleDateFormat ft = null; ft = new java.text.SimpleDateFormat("dd MMMM yyyy"); s = ft.format(dateTime); if (s.indexOf("Jan") > -1) { s = s.replace("January", "Januari"); } else if (s.indexOf("Feb") > -1) { s = s.replace("February", "Februari"); } else if (s.indexOf("Mar") > -1) { s = s.replace("March", "Maret"); } else if (s.indexOf("May") > -1) { s = s.replace("May", "Mei"); } else if (s.indexOf("Jun") > -1) { s = s.replace("June", "Juni"); } else if (s.indexOf("Jul") > -1) { s = s.replace("Jul", "Juli"); } else if (s.indexOf("Aug") > -1) { s = s.replace("August", "Agustus"); } else if (s.indexOf("Oct") > -1) { s = s.replace("October", "Oktober"); } else if (s.indexOf("Feb") > -1) { s = s.replace("November", "Nopember"); } else if (s.indexOf("Dec") > -1) { s = s.replace("December", "Desember"); } return s; } }