2021. 9. 30. 15:25
[TIP]
년+"-"+월+"-"+일
import org.junit.jupiter.api.Test;
import java.sql.Date;
public class DateTest {
private Date date;
private String birth_year = "1999";
private String birth_month = "01";
private String birth_day = "30";
@Test
public void date(){
this.date = Date.valueOf(this.birth_year + "-" + this.birth_month + "-" + this.birth_day);
System.out.println(this.date);
}
}
'Spring Framework > Spring' 카테고리의 다른 글
[Spring Security] 사용자 로그인 상태 체크 (0) | 2022.01.18 |
---|---|
[Spring] JSON 구조 데이터 받기 (0) | 2021.11.29 |
[Web] Cookie (쿠키 생성, 읽기) 방법 (0) | 2021.07.20 |
[JSON] Java - json 파싱 (0) | 2021.07.13 |
[spring] mybatis 설정 (0) | 2021.03.30 |