I am working on a project that involves the manipulation of a string with a CURP format. Although the whole program is already working, I can not validate the dates since I do the following:
inicialAPaterno=curp.charAt(0);
inicialApaterno1=curp.charAt(1);
inicialAMaterno=curp.charAt(2);
inicialNombre=curp.charAt(3);
ano=curp.charAt(4);
ano1=curp.charAt(5);
mes=curp.charAt(6);
mes1=curp.charAt(7);
dia=curp.charAt(8);
dia1=curp.charAt(9);
sexo=curp.charAt(10);
entidad=curp.charAt(11);
entidad1=curp.charAt(12);
And that I do to separate characters from the chain and although my program already does what it should, I would like to convert to date the positions 4
, 5
, 6
, 7
, 8
and 9
That to validate and be able to show in a text box the correct results.