Time difference between two dates


Hi,

I’ am looking for an easy way to compute the time difference between two dates. For example: how many seconds between 2026/01/01, 14:38:00 and 2026/01/02 15:12:00?

I am aware of the TTimeStamp class to manage dates but how to compute a time difference from there?

Thank you

void TimeDiff()
{
   TTimeStamp da1(2026,1,1,14,38,0); 
   TTimeStamp da2(2026,1,1,14,38,23); 
   printf("Time difference in seconds = %ld\n",da2.GetSec()-da1.GetSec());
}