JSP JSTL < FMT: formatdate > tag: format time
•
Java
Example 1@H_502_112 @This example uses the < FMT: formatdate > tag to format the current time into different time formats. The key codes are as follows:
Example 2@H_502_112 @Taking Beijing time 2008-11-29 11:35:19 as an example, this example sets the timezone property to display the time in the Pacific time zone of the United States. The key codes are as follows:
Example 3@H_502_112 @This example applies the < FMT: formatdate > tag, and outputs the current date and time in the tag according to the custom format. The key codes are as follows:
Typical application @ h_ 502_ 112 @ in this example, the < FMT: formatdate > tag is used to format the date, which will realize the format conversion of the date and time in all regions (i.e. different time zones and locations). Use the value attribute of the < FMT: formatdate > tag to set the date to be formatted, and finally use the < C: foreach > tag to iterate all information into the page. The key codes are as follows:
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码