当前位置:网站首页>String type conversion BigDecimal, date type
String type conversion BigDecimal, date type
2022-07-01 22:08:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
String Type conversion BigDecimal type
public static void main(String[] args) { String str1=”2.30″; BigDecimal bd=new BigDecimal(str1); System.out.println(bd); } Java String Type conversion to Date The date type
When inserting a database , Save the current date , Format conversion required
import java.text.SimpleDateFormat;
formatter = new SimpleDateFormat( "yyyy-MM-dd ");
String date = formatter.format(new Date());// Format data , Take the current time result as 2014-10-30
String Format data into Date Format
import java.text.SimpleDateFormat;
formatter = new SimpleDateFormat( "yyyy-MM-dd ");
String s = "2011-07-09 ";
Date date = formatter.parse(s);
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/147198.html Link to the original text :https://javaforall.cn
边栏推荐
- 杰理之蓝牙耳机品控和生产技巧【篇】
- 工控设备安全加密的意义和措施
- Business visualization - make your flowchart'run'up
- PMP与NPDP之间的区别是什么?
- ICML2022 | 基于元语义正则化的介入性对比学习
- 基于三维GIS的不动产管理应用
- 面试题:MySQL的union all和union有什么区别、MySQL有哪几种join方式(阿里面试题)[通俗易懂]
- NIO与传统IO的区别
- 按照功能对Boost库进行分类
- Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
猜你喜欢
Slf4j打印异常的堆栈信息
Microsoft, Columbia University | Godel: large scale pre training of goal oriented dialogue
Go - exe corresponding to related dependency
【智能QbD风险评估工具】上海道宁为您带来LeanQbD介绍、试用、教程
leetcode刷题:二叉树02(二叉树的中序遍历)
EMC-电路保护器件-防浪涌及冲击电流用
[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!
运放-滞回(迟滞)比较器全流程实战计算
MySQL series transaction log redo log learning notes
从MLPerf谈起:如何引领AI加速器的下一波浪潮
随机推荐
以飞地园区为样本,看雨花与韶山如何奏响长株潭一体化发展高歌
测试撤销1
Electron学习(三)之简单交互操作
杰理之烧录上层版物料需要【篇】
Spark面试题
TOPS,处理器运算能力单位、每秒钟可进行一万亿次
基于LSTM模型实现新闻分类
php反射型xss,反射型XSS测试及修复
"The silk road is in its youth and looks at Fujian" is in the hot collection of works in the Fujian foreign youth short video competition
EMC-电路保护器件-防浪涌及冲击电流用
leetcode刷题:二叉树01(二叉树的前序遍历)
Test cancellation 1
pytest合集(2)— pytest运行方式
股票手机开户哪个app好,安全性较高的
打出三位数的所有水仙花数「建议收藏」
Fundamentals - IO intensive computing and CPU intensive computing
ICML2022 | 基于元语义正则化的介入性对比学习
matlab遍历图像、字符串数组等基本操作
基于YOLOv5的口罩佩戴检测方法
焱融看 | 混合云时代下,如何制定多云策略