unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

uses DateUtils;

procedure TForm1.FormCreate(Sender: TObject);
var
  t1,t2: TDateTime;
  b1,b2: Boolean;
begin
  t1 := EncodeDateTime(2009, 5, 21, 11, 22, 33, 999);
  t2 := EncodeDateTime(2009, 5, 21, 12, 22, 33, 999);

  b1 := IsPM(t1); //False;
  b2 := IsPM(t2); //True;

  ShowMessage(BoolToStr(b1, True));
  ShowMessage(BoolToStr(b2, True));
end;

end.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-09-03
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
猜你喜欢
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案