Ver Mensaje Individual
  #2  
Antiguo 01-05-2019
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.042
Reputación: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
No creo que lo hayan cambiado. Me extraña mucho.
http://www.delphibasics.co.uk/RTL.asp?Name=DecodeDate
Código Delphi [-]
unit Unit1;
 
interface
 
uses
  SysUtils,   // Unit containing the DecodeDate command
  DateUtils,
  Forms, Dialogs;
 
type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  end;
 
var
  Form1: TForm1;
 
implementation
{$R *.dfm}  // Include form definitions
 
procedure TForm1.FormCreate(Sender: TObject);
 var
  myDate : TDateTime;
  myYear, myMonth, myDay : Word;
 begin
  // Set up the myDate variable to have a December 2000 value
  myDate := StrToDate('29/12/2000');

  // Now add a month to this value
  myDate := IncMonth(myDate);

  // And let us see what we get
  DecodeDate(myDate, myYear, myMonth, myDay);
  ShowMessage('myDate now = '+DateToStr(myDate));
  ShowMessage('myDay      = '+IntToStr(myDay));
  ShowMessage('myMonth    = '+IntToStr(myMonth));
  ShowMessage('myYear     = '+IntToStr(myYear));
 end;
 
end.
Responder Con Cita