xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

DMY()

Formats a date as "dd. Month yyyy"

Syntax

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

Arguments

<dDate>
An expression returning a Date value. It defaults to Date().
<lPeriod>
Optionally, a logical value can be passed. If <lPeriod> is .T. (true), a period is inserted after the day number in the returned string. The default value is .F. (false).

Return

The function returns the formatted date as a character string. The string contains the month name. A two digit year is inserted when SET CENTURY is OFF.

Info

See also:MDY(), SET CENTURY, SET DATE
Category: CT:DateTime , Date and time
Source:ct\dattime2.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays formatted dates.

   PROCEDURE Main
      LOCAL dDate := StoD( "20061101" )

      ? DMY( dDate )       // result: 1 November 06
      ? DMY( dDate, .T. )  // result: 1. November 06

      SET CENTURY ON
      ? DMY( dDate, .T. )  // result: 1. November 2006
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe