APPEND FROM SDF DATE FIELDS

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
gcarrizo
Posts: 43
Joined: Fri Oct 07, 2016 1:20 pm
DBs Used: DBF
Location: Argentina

APPEND FROM SDF DATE FIELDS

Post by gcarrizo »

8-)

Well I try import from .txt file delimited

with record line's' like this.

36|787|MARZO '17|S|202|LOPEZ R.|2207,68|0,00|0|20/03/2017|01|010036

All fields are imported ok, except date field , that appears in blank.

wrong programmer issue ?

Best Regards

in VFox working good ... lol

-----------------------------------

Bueno, intento importar de un archivo .txt delimitado

con una línea de registro como esta.

36 | 787 | MARZO '17 | S | 202 | LOPEZ R. | 2207,68 | 0,00 | 0 | 20/03/2017 | 01 | 010036

Todos los campos se importan bien, excepto el campo de fecha, que aparece en blanco.

problema de programador equivocado???

Saludos a Todos

en VFox funciona bien ... jajaja
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: APPEND FROM SDF DATE FIELDS

Post by EduardoLuis »

Hola Gcarrizo:

Yo tenia escrita una rutina; dame tiempo para buscarla y te la paso.-
Abrazo
Eduardo

Hi Gcarrizo:

I've wrote a routine; give some time to look for it and i upload.-
With regards.
Eduardo
User avatar
gcarrizo
Posts: 43
Joined: Fri Oct 07, 2016 1:20 pm
DBs Used: DBF
Location: Argentina

Re: APPEND FROM SDF DATE FIELDS

Post by gcarrizo »

Thanks a lot !!!
A greateful help...
Best Regards.
--------------------------------
Muchas Gracias.
Una gran ayuda.
Saludos ...

:D
==================================
EduardoLuis wrote: Fri Aug 17, 2018 12:57 pm Hola Gcarrizo:

Yo tenia escrita una rutina; dame tiempo para buscarla y te la paso.-
Abrazo
Eduardo

Hi Gcarrizo:

I've wrote a routine; give some time to look for it and i upload.-
With regards.
Eduardo
User avatar
CalScot
Posts: 303
Joined: Thu Mar 21, 2013 12:22 am
Location: California

Re: APPEND FROM SDF DATE FIELDS

Post by CalScot »

Just a thought, but as your date in the file to be imported shows as 20/03/2017, is it possible that your system is set to (or defaulting to) using an American style date (which would be 03/20/2017), so your import is rejecting it because there's no month 20 ?
PeteWG
Posts: 176
Joined: Sun Mar 21, 2010 5:45 pm

Re: APPEND FROM SDF DATE FIELDS

Post by PeteWG »

gcarrizo wrote: Fri Aug 17, 2018 12:40 pm ...
wrong programmer issue ?
Not exactly.
(unles the programmer is the creator of .txt file, in which case, yes! it's his fault.. ;) )

In fact, it's the date format that is wrong.
it should drafted to match this format: yyyymmdd to work.
so the 20/03/2017 should be 20170320

hint: in order to achieve such a date format, you must export date values using DtoS( dDate ).

regards,
Pete
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: APPEND FROM SDF DATE FIELDS

Post by Anand »

I make many import from csv programs, to import csv data to our main accounting and inventory application. Many times the data consist of sale or purchases done by different system and database. So the csv files comes with different type of date formats.
We just confirm the format of date in the csv to import and adjust our code accordingly.

Regards,

Anand
Regards,

Anand

Image
User avatar
gcarrizo
Posts: 43
Joined: Fri Oct 07, 2016 1:20 pm
DBs Used: DBF
Location: Argentina

Re: APPEND FROM SDF DATE FIELDS

Post by gcarrizo »

8-)

well.. good point ... after read this I try setting century on, set date british and set date FORMAT "dd/mm/yyyy" but not response as I would like.
Thanks & Best Regards.

----------------------
bien ... buen punto ... despues de leido trate usando century on, set date british y set date FORMAT "dd/mm/yyyy" pero no responde como me gustaría.

Gracias y Saludos

CalScot wrote: Sat Aug 18, 2018 2:01 am Just a thought, but as your date in the file to be imported shows as 20/03/2017, is it possible that your system is set to (or defaulting to) using an American style date (which would be 03/20/2017), so your import is rejecting it because there's no month 20 ?
User avatar
gcarrizo
Posts: 43
Joined: Fri Oct 07, 2016 1:20 pm
DBs Used: DBF
Location: Argentina

Re: APPEND FROM SDF DATE FIELDS

Post by gcarrizo »

I try with your advice but result the same :( however, think like Anand.
Thanks for you support.
Best Regards
Anand wrote: Mon Aug 20, 2018 10:08 am ... So the csv files comes with different type of date formats.
We just confirm the format of date in the csv to import and adjust our code accordingly.
Regards,

Anand

--------------------------------

Trate usando tu consejo pero el resultado es el mismo :( sin embargo pienso como Anand.
Gracias por tu ayuda.
Saludos

"... se reciben distintos archivos del tipo CVS con diferentes formatos de Fecha lo que hacemos es confirmar el tipo de formato para la fecha que usa en el CVS y ajustamos nuestro codigo acorde a ello "

PeteWG wrote: Sat Aug 18, 2018 10:01 am
gcarrizo wrote: Fri Aug 17, 2018 12:40 pm ...
wrong programmer issue ?
Not exactly.
(unles the programmer is the creator of .txt file, in which case, yes! it's his fault.. ;) )

In fact, it's the date format that is wrong.
it should drafted to match this format: yyyymmdd to work.
so the 20/03/2017 should be 20170320

hint: in order to achieve such a date format, you must export date values using DtoS( dDate ).

regards,
Pete
Post Reply