xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

CDoW()

Returns the name of a week day from a date.

Syntax

CDoW( <dDate> ) --> cDayName

Arguments

<dDate>
This is an expression returning a value of data type Date.

Return

The function returns a character string holding the weekday name of <dDate>. When <dDate> is an empty date, the function returns a null string ("").

Description

The CDoW() function converts a date value into the name of the corresponding week day. Use CMonth() to obtain the month name as character value. Both functions are used to format date values in a textual way.

Note:  xHarbour's national language support allows for returning the name of a weekday in various languages. Refer to HB_LangSelect() for selecting a language module.

Info

See also:CMonth(), CtoD(), Date(), Day(), DoW(), HB_LangSelect(), Month(), Year()
Category: Conversion functions , Date and time
Source:rtl\datec.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example demonstrates the conversion of a date value into text.

   PROCEDURE Main
      LOCAL dDate := Date()
      LOCAL cText := "Today is "

      cText += CDoW( dDate ) + ", "
      cText += LTrim( Str( Day( dDate ) ) ) + ". "
      cText += CMonth( dDate ) + " "
      cText += LTrim( Str( Year( dDate ) ) )

      ? cText

      // result: Today is Tuesday, 24. January 2006
   RETURN

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