FUNCTION StringDate( cLine, cTime )
LOCAL ii, nPosi, cMonth, cNext, cYear, nSec, cMore
LOCAL cYYYY, cMM, cDD, cHHMMSS
LOCAL aMonth := { "Jan", ;
"Feb", ;
"Mar", ;
"Apr", ;
"May", ;
"Jun", ;
"Jul", ;
"Aug", ;
"Sep", ;
"Oct", ;
"Nov", ;
"Dec" }
cTime := "00:00:00"
FOR ii := 1 TO LEN( aMonth )
IF aMonth[ ii ] $ cLine
cMM := STRZERO( ii, 2 )
cMonth := aMonth[ ii ]
EXIT
ENDIF
NEXT
IF EMPTY( cMM )
RETURN CTOD( " . . " )
ENDIF
nPosi := AT( "»", cLine )
IF nPosi > 0
cLine := SUBSTR( cLine, nPosi + 7 )
ELSE
RETURN CTOD( " . . " )
ENDIF
// » Thu Oct 06, 2005 6:24 pm </p>
nPosi := AT( cMonth, cLine )
IF nPosi > 0
cNext := SUBSTR( cLine, nPosi + 3 )
nPosi := AT( ",", cNext )
IF nPosi > 0
cDD := LTRIM( SUBSTR( cNext, 1, nPosi - 1 ) )
cYear := LTRIM( SUBSTR( cNext, nPosi + 1 ) )
cYYYY := SUBSTR( cYear, 1, 4 )
cMore := SUBSTR( cYear, 5 )
IF "pm" $ cMore
nPosi := AT( "pm", cMore )
cHHMMSS := SUBSTR( cMore, 1, nPosi - 1 )
nSec := HMS2SEC( cHHMMSS )
nSec += ( 12 * 60 * 60 )
cHHMMSS := SEC2HMS( nSec )
ELSE
nPosi := AT( "am", cMore )
cHHMMSS := SUBSTR( cMore, 1, nPosi - 1 )
nSec := HMS2SEC( cHHMMSS )
cHHMMSS := SEC2HMS( nSec )
ENDIF
ELSE
RETURN CTOD( " . . " )
ENDIF
ELSE
RETURN CTOD( " . . " )
ENDIF
cTime := cHHMMSS
RETURN STOD( cYYYY + cMM + cDD )