Page 1 of 1
APPEND FROM SDF DATE FIELDS
Posted: Fri Aug 17, 2018 12:40 pm
by gcarrizo
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
Re: APPEND FROM SDF DATE FIELDS
Posted: Fri Aug 17, 2018 12:57 pm
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
Re: APPEND FROM SDF DATE FIELDS
Posted: Fri Aug 17, 2018 1:04 pm
by gcarrizo
Thanks a lot !!!
A greateful help...
Best Regards.
--------------------------------
Muchas Gracias.
Una gran ayuda.
Saludos ...
==================================
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
Re: APPEND FROM SDF DATE FIELDS
Posted: Sat Aug 18, 2018 2:01 am
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 ?
Re: APPEND FROM SDF DATE FIELDS
Posted: Sat Aug 18, 2018 10:01 am
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
Re: APPEND FROM SDF DATE FIELDS
Posted: Mon Aug 20, 2018 10:08 am
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
Re: APPEND FROM SDF DATE FIELDS
Posted: Tue Aug 21, 2018 11:31 am
by gcarrizo
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 ?
Re: APPEND FROM SDF DATE FIELDS
Posted: Tue Aug 21, 2018 11:59 am
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