xHarbour Reference Documentation > Function Reference |
Returns the name of a week day from a date.
CDoW( <dDate> ) --> cDayName
The function returns a character string holding the weekday name of <dDate>. When <dDate> is an empty date, the function returns a null string ("").
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.
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 |
// 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
http://www.xHarbour.com