Entering content frame

Background documentation Date and Time Specification for Properties Locate the document in its SAP Library structure

For predefined properties of the type Date, Time, and Timestamp, you can define your own formats for the date and time.

You can use predefined formats or define your own formats.

 

Predefined Formats

Three formats are already predefined: short, medium, long.

Enter the format in the configuration of the property in the Additional Metadata parameter. Use the syntax format=<specification>.

 

Note

The date and time are both displayed in the country-specific setting.

 

Display of the Various Predefined Formats

Type

format=short

format=medium

format=long

date

17.01.05

17.01.2005

17 January 2005

timestamp

17.01.05 16:08:23

17.01.2005 16:08:23

17 January 2005 16:08:23

time

16:08

16:08:23

16:08:23 CEST

 

Freely Definable Formats

You can use patterns based on letter combinations to define your own data and time specifications. The patterns are based on the Java class java.text.SimpleDateFormat.

Patterns for Date and Time Specification

Letter

Date or Time Element

Example

y

Year

yy= 05; yyyy=2005

M

Month in year

MM=12; MMM=December (display is country-specific)

w

Week in year

ww=05

D

Day of year

DDD=345

d

Day of month

dd=05

E

weekday

EEE=WED; EEEE=Wednesday (display is country-specific)

a

AM-PM specification

a=PM; aaa=AM

H

Hour of day (0-23)

HH=23

k

Hour of day (1-24)

kk=24

C

Hour in AM-PM (0-11)

KK=11

h

Hour in AM-PM (1-12)

hh=12

m

Minute of hour

mm=35

s

Second in minute

ss=55

S

Millisecond

SSS=538

 

For more information about the patterns to use for date and time specification, see the Internet at java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html.

 

Enter the format that you have defined in the configuration of the property in the Additional Metadata parameter. Use the syntax customFormat=<pattern>.

 

Note

The date and time are displayed as prescribed, but still in the country-specific setting.

 

Example

customFormat=dd.MM.yyyy hh:mm:ss ® 17.01.2005 04:09:23

customFormat=MM/dd/yyyy ® 01/17/2005

customFormat=hh:mm a ® 12:02 PM

 

if there are errors in the specification that you define, the system uses the default format.

 

 

Leaving content frame