- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
public static java.sql.Date StringToDate(String sDate) {
java.sql.Date Date = null;
if (!sDate.startsWith("00000000")) {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
Date rdate = dateFormat.parse(sDate);
Date = new java.sql.Date(rdate.getTime());
} catch (Exception e) {
}
}
return Date;
}
Комментарии (2) RSS