juniordevjim
juniordevjim

Reputation: 47

How to convert the date and time from Now into TXSDate type in Delphi?

I have to assign the current date and time to same variables which are of type TSXDate. How can I do this? RequestDate and RequestTime are of type TXSDate.

HEADTYPE1 : HEADTYPE;

headtype1.RequestDate := Now as TXSDate;
headtype1.RequestTime := Time as TXDate;

Upvotes: 1

Views: 303

Answers (1)

EugeneK
EugeneK

Reputation: 2224

var
  XSDate: TXSDate;
begin
  XSDate := TXSDate.Create;
  XSDate.AsDate := Now;
  headtype1.RequestDate := XSDate; 
end

Upvotes: 3

Related Questions