Here you can find the source of getDateFromRTGSDateString(String iobDate)
public static Date getDateFromRTGSDateString(String iobDate)
//package com.java2s; /*/*from ww w . j a v a2s .c o m*/ * @(#)ConversionUtil.java * * Copyright by ObjectFrontier, Inc., * 12225 Broadleaf Lane, Alpharetta, GA 30005, U.S.A. * All rights reserved. * * This software is the confidential and proprietary information * of ObjectFrontier, Inc. You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of * the license agreement you entered into with ObjectFrontier. */ import java.sql.Date; public class Main { public static Date getDateFromRTGSDateString(String iobDate) { Date date = null; try { int year = Integer.parseInt(iobDate.substring(0, 4)); int month = Integer.parseInt(iobDate.substring(4, 6)); int day = Integer.parseInt(iobDate.substring(6, 8)); date = new Date(year - 1900, month - 1, day); } catch (Exception e) { throw new RuntimeException(e); } return date; } }