Java.lang.IllegalArgumentException:Timestamp format must be YYYY-MM-DD HH:MM:SS[.FFFFFFFFF]

Source: Internet
Author: User
Tags string format

This method is the conversion method for timestamp.

These days to do the Excel import function, which has a few time slots, so use this class to convert the imported string format timestamp format.

Accidentally appeared.

Java.lang.IllegalArgumentException:Timestamp format must be YYYY-MM-DD HH:MM:SS[.FFFFFFFFF] exception.

After detection, the local does not have this exception, so continue to find the timestamp class some relevant information, and finally in a small example to obtain the results, as follows:

        New SimpleDateFormat ("yyyy-MM-dd HH:mm:ss");          = Df.format (new  Date ());         

Thrown Java.lang.IllegalArgumentException:Timestamp format must be YYYY-MM-DD HH:MM:SS[.FFFFFFFFF]

Be sure to note the format of the time format, where the MM of the month must be capitalized, the year and day must be lowercase yyyy-mm-dd HH:mm:ss

Anomalies, thus, jdk1.6 above the requirements of the format is significantly more rigorous than 1.5.

Java.lang.IllegalArgumentException:Timestamp format must be YYYY-MM-DD HH:MM:SS[.FFFFFFFFF]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.