I have a date with String format "09-06-2011". I need to compare it with another date in java.sql.Date format "2011-06-30 00:00:00". How can I convert a String date to a sql date ?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Use
java.text.DateFormat
andjava.text.SimpleDateFormat
and its parse method. Be sure tosetLenient(false)
.Use
str_to_date
function in MySQL.Format: