当前位置:网站首页>日期处理,字符串日期格式转换
日期处理,字符串日期格式转换
2022-08-09 06:50:00 【EntyIU】
1.date类型转换为其它格式的字符串类型
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd")
String format = df.format(a.getOperationTime());//即可获得对应格式的额时间字符串
2.一个字符串类型的时间串转换格式
String dateStr = "2017-03-01";
Date date = DateUtil.parse(dateStr);//将字符串转化为date类型
String s = DateUtil.formatDate(date);//将时间类型转换为yyyy-MM-dd格式的字符串类型
边栏推荐
- 【Shell】查找进程的pid并根据pid获取该进程所占用的端口号以及该进程在系统中所下达的指令名称
- XILINX K7 FPGA+RK3399 PCIE驱动调试
- 2022-08-08: Given an array arr, it represents the height of the missiles that will appear in order from morning to night.When the cannon shoots missiles, once the cannon is set to shoot at a certain h
- Flask failed to create database without error
- 【MySQL】update mysql.user set authentication_string=password(“123456“) where User=‘root‘; 报错
- The solution that does not work and does not take effect after VScode installs ESlint
- Thread Pool Summary
- 2022.8.8DAY628
- Mysql实操
- 错误:为 repo ‘oracle_linux_repo‘ 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.
猜你喜欢

pycharm环境包导入到另外一个环境

【修电脑】系统重装但IP不变后VScode Remote SSH连接失败解决

错误:为 repo ‘oracle_linux_repo‘ 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.

CMake中INSTALL_RPATH与BUILD_RPATH问题

makefile记录

细谈VR全景:数字营销时代的宠儿

idea中PlantUML插件使用

Search 1688 product interface by image (item_search_img-search 1688 product by image (Politao interface) code docking tutorial

Zero shift of leetcode

Teach you how to make the Tanabata meteor shower in C language - elegant and timeless (detailed tutorial)
随机推荐
买口罩(0-1背包)
力扣 636. 函数的独占时间
报错jinja2.exceptions.UndefinedError: ‘form‘ is undefined
P6 ali machine test of 2020 Fibonacci number
vim 程序编辑器的基本操作(积累)
BeautifulSoup4的介绍与使用
golang zip aes base64
failed (13: Permission denied) while connecting to upstream
2022-08-08: Given an array arr, it represents the height of the missiles that will appear in order from morning to night.When the cannon shoots missiles, once the cannon is set to shoot at a certain h
cut命令的使用实例
【MySQL】update mysql.user set authentication_string=password(“123456“) where User=‘root‘; 报错
高项 04 项目整体管理
Service
XxlJobConfig分布式定时器任务管理XxlJob配置类,替代
Leetcode 70 stairs issues (Fibonacci number)
报错:FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disab
物理层课后作业
【Docker】Docker安装MySQL
Silently start over, the first page is also a new page
事务总结