Excellent!!! Thanks for the quick answer.
>Excel keeps dates internaly as serialized number. You can convert it to date by using following function
>
>* Purpose Convert Serialized-Number-to-Date into Date
>* Param's Serialized Number
>* Return Correspondet date in the date format
>*
>* Note 1. We are using Foxpro ability to do arithmetic with dates
>* 2. We are assuming that the serialized number 1
>* corresponds to the date 12/31/1899
>
>PARAMETER pvSerNum, pdBaseDate
>
>PRIVATE dBaseDate, nSerNum
>nSerNum = IIF(TYPE("pvSerNum")="C", VAL(pvSerNum), pvSerNum)
>dBaseDate = IIF(EMPTY(pdBaseDate), {12/31/1899}, pdBaseDate)
>RETURN dBaseDate + nSerNum - 1
You can also save excel spreedsheet as CSV file and than import into VFP.
>
>
>>I'm trying to import from an excel file. Everything works fine except the date. The worksheet has the date stored in a custom field that looks like this:
>>
>>mm"/"dd"/"yyyy
>>
>>On the worksheet it looks like a normal date (01/01/2001).
>>
>>When it gets imported into a VFP date field, the value is " / / ", when I use a character field, I get some 5 digit number that doesn't seem to resemble the date to me.
>>
>>Can anyone shed some light on this for me. I need to know how to import this into a VFP table without manual manipulation.
>>
>>Thanks.