The following article recommends a way to include a timestamp into the output:
https://www.stata.com/support/faqs/d...date-and-time/
It relies on the two calls to obtain date and time separately.
If the time is close to 23:59:59... on Jan 1 theoretically it is possible that the date evaluates to Jan 1, then the clock ticks, and the time evaluates already to 00:00:00 (for the new date Jan 2), resulting in a timestamp 24 hours away from the actual instant.
This problem would not happen if Stata had a method to return the current timestamp (a combination of current Date and Time), from which the necessary components could have been extracted, but I don't see any.
I believe that this is rather paranoid, but I would still want to record the timestamp correctly. Any advice?
Thank you, Sergiy
https://www.stata.com/support/faqs/d...date-and-time/
It relies on the two calls to obtain date and time separately.
If the time is close to 23:59:59... on Jan 1 theoretically it is possible that the date evaluates to Jan 1, then the clock ticks, and the time evaluates already to 00:00:00 (for the new date Jan 2), resulting in a timestamp 24 hours away from the actual instant.
This problem would not happen if Stata had a method to return the current timestamp (a combination of current Date and Time), from which the necessary components could have been extracted, but I don't see any.
I believe that this is rather paranoid, but I would still want to record the timestamp correctly. Any advice?
Thank you, Sergiy
Comment