| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Converts a "yyyymmdd" formatted string to a Date value
StoD( [<cDate>] ) --> dDate
The function returns the converted character string as a Date value. If no parameter is passed, or if <cDate> is an empty string (""), an empty Date value is returned.
StoD() converts a DtoS() string back to a Date value. This string contains date information which is independent from country specific Date format settings.
| See also: | CtoD(), Date(), DtoC(), DtoS(), StoT() |
| Category: | Conversion functions , Date and time |
| Source: | rtl\dateshb.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays various results of StoD()
PROCEDURE Main
SET CENTURY ON
? StoD( "20060501" ) // result: 05/01/2006
? StoD( "19060521" ) // result: 05/21/1906
? StoD() // result: / /
? StoD("") // result: / /
? StoD( "ABCDEFG" ) // result: / /
RETURN
http://www.xHarbour.com