Returns the date as a string in DD Month YY format


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


<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.).


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


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.


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


       .  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


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




Source is dattime2.prg, library is libct.

See also


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: Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.