'Java'에 해당되는 글 3건

  1. 2009/01/05 두 날자 사이의 날자들 구하기
  2. 2008/02/12 Java with UTF-8
  3. 2008/01/31 iBatis 관련 자료 (2)
Dev & Mng2009/01/05 13:31
/**
* 시작일부터 종료일까지 사이의 날짜를 배열에 담아 리턴 ( 시작일과 종료일을 모두 포함한다 )
*
* @param fromDate
* yyyy-MM-dd 형식의 시작일
* @param toDate
* yyyy-MM-dd 형식의 종료일
* @return yyyy-MM-dd 형식의 날짜가 담긴 배열
*/
public String [] getDiffDays(String fromDate, String toDate) {
    try
    {

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Calendar calDiff = Calendar.getInstance();
        calDiff.setTime(sdf.parse(fromDate));

        //두 날자 사이의 일수
        int iDTCnt = (int)((sdf.parse(toDate).getTime() - sdf.parse(fromDate).getTime()) / 1000 / 60 / 60 / 24);

        // 시작일부터
        calDiff.add(Calendar.DATE, -1);

        // 데이터 저장
        ArrayList list = new ArrayList();

        for (int i = 0; i <= iDTCnt; i++) {
            calDiff.add(Calendar.DATE, 1);
            list.add(sdf.format(calDiff.getTime()));
        }

        String[] result = new String[list.size()];

        list.toArray(result);
        //return sdf.parse(fromDate).toString();

        return result;
    }
    catch (Exception ex)
    {
        //return ex.toString();
        return null;
    }
}




from: http://www.okjsp.pe.kr/seq/90151
Creative Commons License
Creative Commons License

'Dev & Mng' 카테고리의 다른 글

Prompt setting in bash shell  (0) 2009/01/19
두 날자 사이의 날자들 구하기  (0) 2009/01/05
MS SQL Server Port 변경  (0) 2008/12/17
tempdb를 다른 위치로 이동하기  (0) 2008/11/12
Posted by Gleam™
TAG Java
Dev & Mng2008/02/12 11:21
UTF-8로 저장된 소스화일은 컴파일시 "-encoding utf-8" 옵션을 사용해야 한다.
사용자 삽입 이미지
Creative Commons License
Creative Commons License

'Dev & Mng' 카테고리의 다른 글

Database procedure list in MS-SQL Server  (0) 2008/02/12
Java with UTF-8  (0) 2008/02/12
Windows Update Downloader  (0) 2008/02/06
iBatis 관련 자료  (2) 2008/01/31
Posted by Gleam™
TAG Java, UTF-8
Dev & Mng2008/01/31 00:54
iBATIS SqlMaps 2
iBATIS-SqlMaps-2_ko.pdf
http://openframework.or.kr/JSPWiki/attach/Hibernate/iBATIS-SqlMaps-2_ko.pdf

iBATIS SqlMaps 2 Tutorial
iBATIS-SqlMaps-2-Tutorial_ko.pdf
http://openframework.or.kr/JSPWiki/attach/Hibernate/iBATIS-SqlMaps-2-Tutorial_ko.pdf

JPetStore 예제로 살펴보는 Spring MVC와 iBatis 연동
SpringMVC_with_iBatis.pdf
http://wiki.javajigi.net/pages/viewpage.action?pageId=7011&decorator=printable

iBATIS SQL Maps 2.0에 대한 소개
Intro_iBATIS.pdf
http://openframework.or.kr/JSPWiki/Wiki.jsp?page=Introibatis

ORM의 또 다른 핵 iBATIS SQLMaps
iBATIS_SQLMaps.pdf
http://openframework.or.kr/JSPWiki/Wiki.jsp?page=SqlmapsOfMaso

queryForMap()의 사용예제
QueryForMapExample.pdf
http://openframework.or.kr/JSPWiki/Wiki.jsp?page=QueryForMapExample

DDL to iBatis
DDL2iBatis-exe.zipDDL2iBatis_Guid-050810.pdf
http://openframework.or.kr/JSPWiki/attach/Hibernate/DDL2iBatis-exe.zip
http://openframework.or.kr/JSPWiki/attach/Hibernate/DDL2iBatis_Guid-050810.pdf

iBatis Table 생성 예제
iBATIS_Create_Table_Example.pdf
http://gt1000.egloos.com/745601
Creative Commons License
Creative Commons License

'Dev & Mng' 카테고리의 다른 글

Windows Update Downloader  (0) 2008/02/06
iBatis 관련 자료  (2) 2008/01/31
Windows Server 2008 Hyper-V를 사용하면서...  (1) 2008/01/24
IIS+FastCGI를 구성하고 테스트하면서...  (0) 2007/12/31
Posted by Gleam™
TAG iBATIS, Java