Timestamp转String

数据库导出Birthday是Timestamp类型,需要转成字符串

 if(object instanceof Timestamp ){
    
    
                                    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
                                    String creaT=sdf.format(object);
                                    object = creaT;
                                }

猜你喜欢

转载自blog.csdn.net/qq_43713040/article/details/112341153