I added this to my arsenal years ago:
PROCEDURE stod
LPARAMETER tcDateString
IF TYPE('tcDateString') # 'C'
RETURN {//}
ENDIF
IF VAL(tcDateString) = 0
RETURN {//}
ELSE
RETURN (DATE(VAL(LEFT(tcDateString,4)),;
VAL(SUBSTR(tcDateString,5,2)),;
VAL(SUBSTR(tcDateString,7,2))))
ENDIF
Jeff
Jeff Johnson
[email protected]
SanDC, Inc.
623-582-0323
Fax 623-869-0675
Mark Stanton wrote:
> Is there really no VFP function that is the reverse of DTOS?
>
> DTOS turns <date> into "YYYYMMDD". I can break it apart manually and
> put it back together as a date, but it's a bit laborious. Nothing
> already inside?
>
> Mark Stanton
> One small step for mankind...
>
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.