博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
获取当前时间
阅读量:4205 次
发布时间:2019-05-26

本文共 135 字,大约阅读时间需要 1 分钟。

获取当前时间

  • Date d = new Date();

  • SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

  • String now = df.format(d);

now即为当前时间。。。。

转载地址:http://zgxli.baihongyu.com/

你可能感兴趣的文章
JavaWeb 使用Intellij IDEA部署Web项目出现JmxAdminException
查看>>
Maven 使用Intellij IDEA部署添加Maven Module出现 'pom.xml' already exists in VFS
查看>>
Git .gitignore文件比较完善的写法
查看>>
JavaWeb 提交中文数据乱码问题总结
查看>>
JavaWeb forward与sendRedirect区别
查看>>
JavaWeb 报错The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml
查看>>
JavaWeb getParameter和getAttribute的区别
查看>>
JavaWeb jsp内置对象与servlet对应关系
查看>>
Spring 之依赖注入DI
查看>>
Spring 注解总结
查看>>
Spring 面向切面编程AOP
查看>>
数据库优化 SQL语句优化
查看>>
Spring 各个jar包的作用
查看>>
SpringMVC 出现ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
查看>>
SpringMVC 过滤器HiddenHttpMethodFilter
查看>>
SpringMVC 返回json数据报错IllegalArgumentException: No converter found for return value of type:xxx
查看>>
SpringMVC 基本配置文件
查看>>
Velocity 模板出现NestedIOException: Cannot find Velocity template for URL [layout.vm]
查看>>
Velocity 模板基本用法
查看>>
SpringMVC 使用总结
查看>>