Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
dateformat:create
Creates a date-format object which can be used to convert a date value to a displayable string.
Syntax
<dateformat:create
name="
objectName
"
[locale="
localeObjectName
"]
[datestyle="
medium|short|long|full
"]
[timestyle="
medium|short|long|full
"]
[timezoneid="
timeZoneID
"]
/>Parameters
name (required)
- Input. Name to assign the date-format object.
locale (optional)
- Name of the locale object to use for this date-format object. If not specified, the default is the current machine default locale.
datestyle (optional)
- Style for date. Default is
MEDIUM
. The possible values are as follows:
short
- Completely numeric, such as 12.13.52.medium
- (Default) Longer, such as Jan. 12, 1952.long
- Still longer, such as January 12, 1952.full
- Fully specified, such as Tuesday, April 12, 1952 AD.
timestyle (optional)
- Style for time. Default is
MEDIUM
. The legal values are as follows:
medium
- (Default) Completely numeric, such as 3:30:42pm.full
- Fully specified, such as 3:30:42pm PST. The timezone will only be appended if it is specified by the timezoneid attribute.
TIMEZONEID (optional)
- Either an abbreviation such as "PST", a full name such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". See TimeZoneID for a list of common TimeZone IDs.
Description
This tag creates a date-format object which can be used for formatting a date for display in a specified locale.
Error Numbers
There are no possible
errno
for this tag.Example
This displays a date in the following format Jan 12, 1952 3:30:42 PM EST for locale en_US.
<locale:create varname="currLocale" localename="en_US" /> <dateformat:create name="_formatdate_" timestyle="full" locale="currLocale"/> <dateformat:getdatetime name="_formatdate_" value='<%=ics.getvar("inputdate")%>' valuetype="jdbcdate" varname="formatteddate"/> <ics:getvar name="formatteddate"/>See Also
dateformat:getdate
dateformat:gettime
dateformat:getdatetime
locale:create
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.