DMY()

DMY()

Returns the date as a string in DD Month YY format

Syntax

       DMY([<dDate>], [<lMode>]) --> cDate

Arguments

<dDate> Designates the date from which to create a string. The default is the system date.

<lMode> Designates whether to insert a period (.) after the day (see Examples). The default is no period (.F.).

Returns

DMY() returns a character string in “DD[.] Month YY” format or “DD[.] Month YYYY” format.

Description

Use DMY() to return the date as a character string using the day, name of month, and year. The SET CENTURY ON/OFF switch determines whether or not the year is displayed in two or four digits. If the <lMode> parameter is designated .T., the function builds in a “.” after the day designation. If no date is designated as a parameter, the function automatically uses the current system date.

Note

. The month name returned depends on which CA-Clipper nations module is in use.

Examples

       .  Display the system date (1/1/89):
              SET CENTURY OFF
              ? DMY()                            // 1 January 89
           .  With ".":
              ? DMY(.T.)                         // 1. January 89
           .  Display a different date:
              SET CENTURY ON
              ? DMY(CTOD("02/01/89"), .T.)       // 1. February 1989

Compliance

DMY() is compatible with CT3’s DMY().

Platforms

All

Files

Source is dattime2.prg, library is libct.

See also

MDY()

Advertisements

2 responses to “DMY()

  1. Pingback: Harbour Date & Time Functions | Viva Clipper !

  2. Pingback: Harbour All Functions – D | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s