先贴个连接....大佬的
https://blog.csdn.net/yangshuanbao/article/details/6864054
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //24小时
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); //12小时
先贴个连接....大佬的
https://blog.csdn.net/yangshuanbao/article/details/6864054
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //24小时
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); //12小时