Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public LocalDateTime objectAsTimestamptoLocalDateTime(Object ob) {
- try {
- if (ob instanceof java.sql.Timestamp) { return ((java.sql.Timestamp) ob).toLocalDateTime(); }
- return null;
- } catch (Exception e) {
- return null;
- }
- }
- public LocalDate objectAsSqlDatetoLocalDate(Object ob) {
- try {
- if (ob instanceof java.sql.Date) { return ((java.sql.Date) ob).toLocalDate(); }
- return null;
- } catch (Exception e) {
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement