본문 바로가기

JAVA/Spring

[JDBC] MySQL 시간 데이터형에 맞춰 시간 넣기

 

Mysql 시간 데이터타입 JAVA
DATE import java.time.LocalDate;
LocalDate currentDate = LocalDate.now();
TIME  
YEAR  
DATETIME import java.sql.Timestamp;
Timestamp timestamp = new Timestamp(System.currentTimeMillis())
TIMESTAMP  

 

 

728x90