WEBINAR: On-demand webcast
How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >
Like Chris Sells' replacement, it was also started from the MFC version, and uses system calls for dates and times. However, internally, the class uses a method called getAsDouble to determine whether an OLE DATE format is used or a double for the time span is used. It incorporates all the functionality of COleDateTime and COleDataTimeSpan, but it uses a small character to start the method names.
An example of using the TimeStamp class is:
// set start and end of time window TimeStamp start; start.getCurTimeStamp(); TimeStamp end = start + TimeStamp::getdays (7);
Lastly, there are several string methods for getting the date time as a string. These methods simplify usage so that you don't have to pull up help for GetTimeFormat/GetDateFormat to get the time as a string.
Download source - 5 KB TimeStamp_src.zip