SET DATE BRITISH SET CENTURY ONit starts working correctly.
CREATE CURSOR MyCursor (perfil C(1), act_med C(7), anno N(4), autog C(15), caso C(2), cas_ref C(3), codcen C(4), cod_egre C(1), complica N(2); , diag C(7), diag2 C(7), diag3 C(7), diagegre2 C(7), diagegre3 C(7), dias N(3), dias_esta N(5), edad N(3), fecha D, fec_egre D; , fec_nac D, gdx C(3), gere C(3), historia C(7), horae C(8), horai C(8), id C(6), mes N(2), meses N(3), nive C(2), nombre C(40); , pac_e C(1), pac_s C(1), prioridad C(1), refere C(1), referido C(3), semana N(2), servi C(3), servirgh C(3), sexo C(1), tipat C(1); , tipo_ase C(2), topico C(20), ubigeo C(6), svei N(1), idmes C(2), sele N(1), epidem N(1)) APPEND FROM "MyCSV.csv" TYPE CSV && CSV is attached. GO TOP BROWSE NOMODIFY && To see data.Modified code:
SET DATE BRITISH SET CENTURY ON CREATE CURSOR MyCursor (perfil C(1), act_med C(7), anno N(4), autog C(15), caso C(2), cas_ref C(3), codcen C(4), cod_egre C(1), complica N(2); , diag C(7), diag2 C(7), diag3 C(7), diagegre2 C(7), diagegre3 C(7), dias N(3), dias_esta N(5), edad N(3), fecha D, fec_egre D; , fec_nac D, gdx C(3), gere C(3), historia C(7), horae C(8), horai C(8), id C(6), mes N(2), meses N(3), nive C(2), nombre C(40); , pac_e C(1), pac_s C(1), prioridad C(1), refere C(1), referido C(3), semana N(2), servi C(3), servirgh C(3), sexo C(1), tipat C(1); , tipo_ase C(2), topico C(20), ubigeo C(6), svei N(1), idmes C(2), sele N(1), epidem N(1)) APPEND FROM "MyCSV.csv" TYPE CSV && CSV is attached. GO TOP BROWSE NOMODIFY && To see data.IMPORTANT: Even if you were careful to put SET DATE BRITISH in the main program file, if the code in question executes in a private data session -- the default configuration of SET DATE AMERICAN will be in effect (unless of course you set it explicitly in code). (i.e. in private data session, the system defaults apply)
dDate = {01/02/03} && dependent on SET DATE configuration at compile time dDate = CTOD("01/02/03") && Dependent on SET DATE at run time dDate = {^2000.01.02} && not dependent on SET DATE at runtime nor compile time dDate = DATE(2011,01,03) && not dependent on SET DATE at runtime nor compile time