I have a datetime from which I would like to extract hour in a new column in the data set. For datetime values greater than 30minutes past the hour, the hour is reported as the next largest hour. Why is this happening and how do I fix it? Below is my code and the resulting output. NOTE: I also used time=timepart(timestamp); format time hour.; with the same result.
format hour hour. ;