"Quickening the Pace of JSP Development" Tuesday, March 16, 2010
Home Products Pricing Company Contact Us Samples Download Forums Javadoc Customers
    « Form Tags »
    « I/O Tags »
    « Format Tags »
    « Utility Tags »
Date Tag Example

The <dotj:date> tag can be used to display date/time values in a great number of ways. You can supply the value of the date or time via the tag's body, which can be in just about any date format.

The tag also fully supports internationalization.

Example Date/Time Format Result
Example 1 Current Date MM/dd/yyyy 03/16/2010
Example 2 Current Date MMMM dd, yyyy March 16, 2010
Example 3 Current Date EEEE, MMMM dd, yyyy Tuesday, March 16, 2010
Example 4 09/15/2032 MMMM dd, yyyy September 15, 2032
Example 5 Current Time hh:mm:ss a 09:54:47 PM
Example 6 Current Time HH:mm:ss 21:54:47
Example 7 Current Time hh:mm:ss a z 09:54:47 PM EDT
Example 8 09:45:32 AM hh:mm:ss a 09:45:32 AM
Example 9 Current Date and Time MM/dd/yyyy hh:mm:ss a z 03/16/2010 09:54:47 PM EDT
Example 10 Current Date - FRENCH Locale EEEE, MMMM dd, yyyy mardi, mars 16, 2010
Example 11 Current Date - Spanish, Mexico EEEE, MMMM dd, yyyy martes, marzo 16, 2010
Example 12 "09/15/2032 01:13:45" EEEE, MMMM dd, yyyy hh:mm:ss a z Wednesday, September 15, 2032 01:13:45 AM EDT
Example 13 Last Modified Date (of this file) EEEE, MMMM dd, yyyy hh:mm:ss a z Tuesday, February 10, 2004 02:39:12 AM EST
Example 14 One thousand Milliseconds since Jan. 01, 1970 00:00:00 GMT MM/dd/yyyy hh:mm:ss a z 12/31/1969 07:00:01 PM EST
Example 15 One Second since Jan. 01, 1970 00:00:00 GMT MM/dd/yyyy hh:mm:ss a z 12/31/1969 07:00:01 PM EST



          Back to Samples page


home : products : pricing : company : contact us : samples : download : forums : customers

Copyright © 2000-2004 dotJ Software Inc. All rights reserved.