Here you can find the source of getDateYYMM(java.sql.Timestamp ts)
Parameter | Description |
---|---|
ts | - Timestamp |
public static String getDateYYMM(java.sql.Timestamp ts)
//package com.java2s; public class Main { /**/*from w w w.ja va 2 s. co m*/ * given timestamp object and return string format of YYMM * <p/> * <p/> * * @param ts - Timestamp * @return String * author Vincent Yuen * version %I%, %G% */ public static String getDateYYMM(java.sql.Timestamp ts) { String oracleDate = ""; if (ts != null) { oracleDate = ts.toString().substring(2, 4) + ts.toString().substring(5, 7); } return oracleDate; } }