I am trying to import "2012-04-24 08:00:01" as a datetime, but it shows as "2012-04-24 07:59:57". Could you please help me understand why?
Code:
clear set obs 1 gen timestr="2012-04-24 08:00:01" gen timec=clock(timestr,"YMDhms") format timec %tcCCYY-NN-DD_HH:MM:SS list
Code:
+-------------------------------------------+ | timestr timec | |-------------------------------------------| 1. | 2012-04-24 08:00:01 2012-04-24 07:59:57 | +-------------------------------------------+
0 Response to datetime 2012-04-24 08:00:01
Post a Comment