| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Converts a "YYYYMMDDhhmmss.ccc" formatted string to a DateTime value
StoT( [<cDateTime>] ) --> dDateTime
The function returns the converted character string as a DateTime value. If no parameter is passed, or if <cDateTime> is not a valud DateTime string (""), an empty DateTime value is returned.
StoT() converts a TtoS() string back to a DateTime value. This string contains date and time information which is independent from country specific Date format settings.
| See also: | Date(), DateTime(), StoD(), TtoC(), TtoS() |
| Category: | Conversion functions , Date and time , xHarbour extensions |
| Source: | rtl\dateshb.c |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays various results of StoT()
PROCEDURE Main
SET CENTURY ON
? StoT( "20070426" ) // result: 04/26/2007
? StoT( "20070426133045" ) // result: 04/26/2007 13:30:45.00
? StoT( "20070426133045.67" ) // result: 04/26/2007 13:30:45.67
? StoD() // result: / /
? StoD( "ABCDEFG" ) // result: / /
RETURN
http://www.xHarbour.com