|
Improved Date
There are functions in SysUtils in Delphi that refer to the current Date and Time. ‘Now’ refers to the current Date and Time which is encoded together. ‘Date’ refers only to the current date and ‘Time’ only to the current time. There are instances where it is more efficient to use ‘Date’ and ‘Time’ instead of ‘Now’ when you are only concerned with a particular part of the current date.
For example:
sTime:=TimeToStr(Now);
would be better written as :
sTime:=TimeToStr(Time);
< Back to list of hints and warnings
|
|