On the jsp page, the 24-hour extraction time from the mysql database is displayed.

Source: Internet
Author: User
The display method is as follows: % @ tagliburijava. sun. comjspjstlfmtprefixfmt % fmt: formatDatevalue $ {music. addDatetime} patternyyyy-MM-ddHH: mm: ss indicates the red letter. If H is used, it is in the 24-hour format. If h is used, the 12-hour plan is complete.

Display Method: % @ taglib uri = http://java.sun.com/jsp/jstl/fmt prefix = fmt % fmt: formatDate value =$ {music. addDatetime} pattern = yyyy-MM-dd HH: mm: ss indicates the red letter. If H is used, it is in the 24-hour format. If h is used, the 12-hour plan is complete.

The display method is as follows:

<% @ Taglib uri = "http://java.sun.com/jsp/jstl/fmt" prefix = "fmt" %>

The key lies in the red letter. If the Big H is used, it is in the 24-hour format. If the small h is used, it is in the 12-hour format.

It's done.

Related Article

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.