I have a flat file with delimiter with char ~

it has date field also with format as dd-mmm-yyyy

i changed the date setting as short or long in vfp
in regional setting of windows control panel also i have kept the setting as
dd-mmm-yyyy .

But while appending the data i am getting the blank field in the all the
date fileds ,

Pleae let us help.

Bankim

Re: Appending from file delimiter by Bernhard

Bernhard
Fri Aug 18 04:20:36 CDT 2006

Hi Bankim Desai,

> it has date field also with format as dd-mmm-yyyy
This looks, as if your date field has the month as a 3 letter abbrev.
There is no built in function in VFP to convert such a date to a value of type
date.
One way to import this kind of data would be: import the date field to a column
of type C(11), build your own conversion function and do the conversion later in
VFP, maybe like
REPLACE ALL dfield with dateconversion(cfield)
or
SELECT *, dateconversion(cfield) AS dfield FROM ...

Regards
Bernhard Sander

Re: Appending from file delimiter by AA

AA
Fri Aug 18 02:39:05 CDT 2006

Try
SET DATE DMY
in VFP
-Anders

"Bankim Desai" <BankimDesai@discussions.microsoft.com> skrev i meddelandet
news:664B02B4-788E-40E7-BD42-B9AD8C8E17F6@microsoft.com...
>I have a flat file with delimiter with char ~
>
> it has date field also with format as dd-mmm-yyyy
>
> i changed the date setting as short or long in vfp
> in regional setting of windows control panel also i have kept the setting
> as
> dd-mmm-yyyy .
>
> But while appending the data i am getting the blank field in the all the
> date fileds ,
>
> Pleae let us help.
>
> Bankim



Re: Appending from file delimiter by BankimDesai

BankimDesai
Wed Aug 23 09:43:01 CDT 2006

Hi,

It does not work with any date format

"AA" wrote:

> Try
> SET DATE DMY
> in VFP
> -Anders
>
> "Bankim Desai" <BankimDesai@discussions.microsoft.com> skrev i meddelandet
> news:664B02B4-788E-40E7-BD42-B9AD8C8E17F6@microsoft.com...
> >I have a flat file with delimiter with char ~
> >
> > it has date field also with format as dd-mmm-yyyy
> >
> > i changed the date setting as short or long in vfp
> > in regional setting of windows control panel also i have kept the setting
> > as
> > dd-mmm-yyyy .
> >
> > But while appending the data i am getting the blank field in the all the
> > date fileds ,
> >
> > Pleae let us help.
> >
> > Bankim
>
>
>

Re: Appending from file delimiter by BankimDesai

BankimDesai
Wed Aug 23 09:43:02 CDT 2006

Hi,

that solution can i am aware of, any other solution whereby data can be
imported directly in the file by append command and date setting.


"Bernhard Sander" wrote:

> Hi Bankim Desai,
>
> > it has date field also with format as dd-mmm-yyyy
> This looks, as if your date field has the month as a 3 letter abbrev.
> There is no built in function in VFP to convert such a date to a value of type
> date.
> One way to import this kind of data would be: import the date field to a column
> of type C(11), build your own conversion function and do the conversion later in
> VFP, maybe like
> REPLACE ALL dfield with dateconversion(cfield)
> or
> SELECT *, dateconversion(cfield) AS dfield FROM ...
>
> Regards
> Bernhard Sander
>

Re: Appending from file delimiter by AA

AA
Sun Aug 27 12:44:37 CDT 2006

I see. If you have a date with a three-letter abbreviation for the month
name you have to import it into a Char field and add a Date field to the
table.
I once did this by adding month variables to a conversion program
jan = 1
feb = 2
and so on.
....
Eaxample:
oct= 10
x = "12-Oct-1999"
?
DATE(VAL(getwordnum(x,3,'-')),EVALUATE(GETWORDNUM(x,2,'-')),VAL(getwordnum(x,1,'-')))

In your table
REPLACE ALL datefield WITH ;
DATE(VAL(getwordnum(Chardate,3,'-')), ;
EVALUATE(GETWORDNUM(chardate,2,'-')), ;
VAL(getwordnum(chardate,1,'-')))

-Anders



"Bankim Desai" <BankimDesai@discussions.microsoft.com> skrev i meddelandet
news:30A6CE2A-5CA7-4A74-8683-4B091B2BEA47@microsoft.com...
> Hi,
>
> It does not work with any date format
>
> "AA" wrote:
>
>> Try
>> SET DATE DMY
>> in VFP
>> -Anders
>>
>> "Bankim Desai" <BankimDesai@discussions.microsoft.com> skrev i
>> meddelandet
>> news:664B02B4-788E-40E7-BD42-B9AD8C8E17F6@microsoft.com...
>> >I have a flat file with delimiter with char ~
>> >
>> > it has date field also with format as dd-mmm-yyyy
>> >
>> > i changed the date setting as short or long in vfp
>> > in regional setting of windows control panel also i have kept the
>> > setting
>> > as
>> > dd-mmm-yyyy .
>> >
>> > But while appending the data i am getting the blank field in the all
>> > the
>> > date fileds ,
>> >
>> > Pleae let us help.
>> >
>> > Bankim
>>
>>
>>