In Delphi Win32, you have EncodeTime and DecodeTime functions to manipulate DateTime data or variables. Are there any functions similar to these in DELPHI Prism? If not, How would you do it?
For instance, you wanted to Add two datetime variables (A and B) together, after increasing B by one day.
Thanks,
You must use the
DateTimetype, this class has many constructors which you can use to encode a a datetime.Example to encode a DateTime
To Decode a DateTime you must use the properties Year, Month, Day, Minute and Second.
Now to modify a Datetime adding days , years or another range you can use the methods
AddYears,AddMonths,AddDaysand so on.