Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Date display formats – PB Docs 126 – PowerBuilder Library

Date display formats – PB Docs 126

Date display formats

Date display formats can have two sections. The first is required
and contains the format for dates; the second is optional and specifies
how to represent NULLs:

Special characters

Table 22-4 shows
characters that have special meaning in date display formats.

Table 22-4: Characters with special meaning
in data display formats

Character

Meaning

Example

d

Day number with no leading zero

9

dd

Day number with leading zero if appropriate

09

ddd

Day name abbreviation

Mon

dddd

Day name

Monday

m

Month number with no leading zero

6

mm

Month number with leading zero if appropriate

06

mmm

Month name abbreviation

Jun

mmmm

Month name

June

yy

Two-digit year

97

yyyy

Four-digit year

1997

Colons, slashes, and spaces display as entered in the mask.

note.png About 2-digit years

If users specify a 2-digit year in a DataWindow object, PowerBuilder assumes the
date is the 20th century if the year is greater than or equal to
50. If the year is less than 50, PowerBuilder assumes the 21st century.
For example:

  • 1/1/85 is interpreted
    as January 1, 1985.

  • 1/1/40 is interpreted as January 1,
    2040.

Date keywords

You can use the following keywords as date display formats
when you want PowerBuilder to determine an appropriate format to use:

  • [ShortDate]

  • [LongDate]

The format used is determined by the regional settings for
date in the registry. Note that [Date] is
not a valid display format.

Examples

Table 22-5 shows
how the date Friday, January 30, 1998, displays when different format
masks are applied.

Table 22-5: Date display format examples

Format

Displays

[red]m/d/yy

1/30/98 in red

d-mmm-yy

30-Jan-98

dd-mmmm

30-January

mmm-yy

Jan-98

dddd, mmm d, yyyy

Friday, Jan 30, 1998


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x