Ver Mensaje Individual
  #2  
Antiguo 05-12-2003
Avatar de Investment
Investment Investment is offline
Miembro
 
Registrado: may 2003
Posts: 378
Reputación: 22
Investment Va por buen camino
Truco 78 del trucomania (espero que te sirva):

Hallar el numero de semana del año de una fecha


Código:
   
   procedure TForm1.Button1Click(Sender: TObject);
    var  
        frstDay,toDay : TDateTime;  
        week : Integer;
    begin 
       frstDay := StrToDate('1/1/96');
       toDay := StrToDate(Edit1.Text);
       week := Trunc((toDay - frstDay) / 7) + 1;
       Label1.Caption := IntToStr(week);
    end;
__________________
Saludos,
Peter Investment
Responder Con Cita