Hi,
regarding datetime manipulation, the -numdate- and -convdate-- commands, from SSC, are very handy.
however, in the following situation, dates are converted to previous day.
and seems obvious it is related to "00:00:00".
Any clue?
regarding datetime manipulation, the -numdate- and -convdate-- commands, from SSC, are very handy.
however, in the following situation, dates are converted to previous day.
Code:
clear input double dateref 2.0196864e+12 2.0223648e+12 2.0248704e+12 2.0275488e+12 2.0301408e+12 2.0328192e+12 2.0354112e+12 2.0380896e+12 2.040768e+12 2.04336e+12 end format %tc dateref . convdate daily datevar_d = dateref . convdate monthly datevar_m = dateref . list +-------------------------------------------+ | dateref datevar_d dateva~m | |-------------------------------------------| 1. | 01jan2024 00:00:00 31dec2023 2023m12 | 2. | 01feb2024 00:00:00 01feb2024 2024m2 | 3. | 01mar2024 00:00:00 29feb2024 2024m2 | 4. | 01apr2024 00:00:00 01apr2024 2024m4 | 5. | 01may2024 00:00:00 30apr2024 2024m4 | |-------------------------------------------| 6. | 01jun2024 00:00:00 01jun2024 2024m6 | 7. | 01jul2024 00:00:00 30jun2024 2024m6 | 8. | 01aug2024 00:00:00 01aug2024 2024m8 | 9. | 01sep2024 00:00:00 31aug2024 2024m8 | 10. | 01oct2024 00:00:00 01oct2024 2024m10 | +-------------------------------------------+
and seems obvious it is related to "00:00:00".
Any clue?
Comment