Documentation

Search 

Contents

  1. Introduction
  2. Getting Started
  3. Trinidad Concepts
  4. Code View Support
  5. Design View Support
  6. Tag Object Toolbars
  7. Server Behaviors
  8. Property Inspectors
Selected 9. Trinidad Tag Reference

10. Trinidad Core Tag Reference

Contents > Trinidad Core Tag Reference > tr:convertDateTime

tr:convertDateTime

The tr:convertDateTime tag is used to convert a string to java.util.Date object and back to a string based on pattern or date and time styles.

Example

<tr:convertDateTime></tr:convertDateTime>

HTML Output

(No output.)

Tag Attributes

dateStyle Enumerated
 
The dateStyle attribute sets the formatting style for the date component. Valid values are "shortish", "short", "default", "medium", "long", and "full". The default is "shortish".
id Text
 
The unique identifier value for this component. The value must be unique within the closest naming container.
locale Enumerated
 
The locale attribute sets the language, country, and variant for formatting locale-sensitive data such as numbers and dates. If not specified, the Locale returned by FacesContext.getViewRoot().getLocale() will be used. Valid expressions must evaluate to a java.util.Locale.
messageDetailConvertBoth Text
 
The messageDetailConvertBoth attribute sets the custom error message with the parameters {0} for a label to identify the component, {1} for the value from the user and {2} for the pattern, for date and time values that cannot be converted when the type attribute is set to both and the pattern attribute is not set or null.
messageDetailConvertDate Text
 
The messageDetailConvertDate attribute sets the custom error message with the parameters {0} for a label to identify the component, {1} for the value from the user and {2} for the pattern, for date and time values that cannot be converted when the type attribute is set to date and the pattern attribute is not set or null.
messageDetailConvertTime Text
 
The messageDetailConvertTime attribute sets the custom error message with the parameters {0} for a label to identify the component, {1} for the value from the user and {2} for the pattern, for date and time values that cannot be converted when the type attribute is set to time and the pattern attribute is not set or null.
pattern Text
 
The pattern attribute sets the custom formatting pattern.
secondaryPattern Text
 
The secondaryPattern attribute sets the second pattern to be used if the pattern set in the pattern attribute fails.
timeStyle Enumerated
 
The timeStyle attribute sets the formatting style for the time component of the date. Valid values are "default", "short", "medium", "long", and "full". The default is "short".
timeZone Enumerated
 
The timeZone attribute sets the time zone. If this attribute is not set, then the value is taken from trinidad-config.xml, and if the value is not found, then the value is set to GMT.
type Enumerated
 
The type attribute sets the type of date component. Valid values are "date", "time", and "both". The default is "date".