[英]How to parse string to date format in java
I have a file file_20201013_012417.txt and I want to validate the timestamp 20201013_012417 format of this file is YYYYMMDD_HHmmSS.我有一个文件 file_20201013_012417.txt,我想验证这个文件的时间戳 20201013_012417 格式是 YYYYMMDD_HHmmSS。
I have tried SimpleDateFormat , but getting java.text.ParseException: Unparseable date execption.我试过 SimpleDateFormat ,但得到 java.text.ParseException: Unparseable date execption。
Any help is appreciated.任何帮助表示赞赏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.