SimpleDateFormat
时间: 2023-11-22 17:50:07 浏览: 32
SimpleDateFormat是Java中的一个类,用于将Date对象格式化为字符串,或将字符串解析为Date对象。它提供了一种简单的方式来定义日期和时间的格式化模式。通过指定特定的格式字符串,可以将日期和时间转换成所需的样式。例如,可以使用SimpleDateFormat将日期对象格式化为"yyyy-MM-dd HH:mm:ss"的字符串形式。另外,也可以使用SimpleDateFormat将字符串解析为Date对象,前提是字符串的格式符合指定的格式。举个例子,在Java中,可以使用SimpleDateFormat将字符串"2020-05-29"解析为java.sql.Date类型的对象。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* *2* [java 日期格式化-- SimpleDateFormat 的使用。字符串转日期,日期转字符串](https://blog.csdn.net/qq_27093465/article/details/53034427)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [详解SimpleDateFormat](https://blog.csdn.net/qq_45370866/article/details/105844022)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![reg](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)