Ver Mensaje Individual
  #1  
Antiguo 27-06-2008
Avatar de tcp_ip_es
tcp_ip_es tcp_ip_es is offline
No confirmado
 
Registrado: ago 2003
Ubicación: Madrid
Posts: 635
Reputación: 0
tcp_ip_es Va por buen camino
No has inicializado la variable data. Con lo cual pilla la fecha por defecto.

Código:
procedure calc_anys(var anysup: integer; var anyinf: integer; var ComboboxEdat: TCombobox);
var
year, month, day:word;
Data: TDateTime;
begin
  //Fecha hoy
  Data:=date; 
  DecodeDate(Data, Year, Month, Day);
  showmessage(IntToStr(year));
end;
Saludos, Tony
Responder Con Cita