Search code examples
c++c++buildervcl

Current date/time in TDateTime variable


I am using C++ and am using the TDateTime data type.

How can I get the current system date/time and place it into a TDateTime variable?


Solution

  • You call Now(), TDateTime t = Now();. Here is a tutorial. You should be able to figure this stuff out by a simple search. Please try to make more effort in trying to figure out these problems by yourself.