Here is a line of C++ code that constructs a timestamp from parts. The first parameter is TimeStampISO, then Year, Month, Day, Hour, Minute and Second. In our model all fields come from the fields model.
As C++:
&(1:) = ObTimeStampFld(&(2:),&(3:),&(4:),&(5),&(6),&(7));
The template for this is found in the OBTIME.H file in the c:\program files (x86)\CA\Plex\7.2.1\include directory (or equivalent). There does not appear to be a function for creating a timestamp from a date and a time, so you have to use the DateISOToDateStructure and TimeISOToTimeStructure functions first, or you could do something like the following. The first parameter would be TimeStampISO, the DateISO, then TimeISO. I have not tested this line, so there may be syntax errors.
&(1:) = ObTimeStamFld(&(2:).GetDateYear(), &(2:).GetDateMonth(), &(2:).GetDateDay(), &(3:).GetTimeHour(), &(3:).GetTimeMinute(), &(3:).GetTimeSecond());
Original Message:
Sent: May 09, 2025 07:34 AM
From: Gunnar Gunnarsson
Subject: cpp construct timestamp from dateiso and timeiso
Hello, Does anyone have cpp source code to contruct timestamp from parts, mostly dateiso and timeiso.
Thanks.