Obs | TIMESTAMP | WEEK | MONTH | YEAR | DAY | total_days from Jan 01 2013? |
1 | 2/11/2013 | 6 | 2 | 2013 | 11 | |
2 | 2/11/2013 | 6 | 2 | 2013 | 11 | |
3 | 2/12/2013 | 6 | 2 | 2013 | 12 | |
4 | 2/12/2013 | 6 | 2 | 2013 | 12 | |
5 | 2/12/2013 | 6 | 2 | 2013 | 12 | |
6 | 2/13/2013 | 6 | 2 | 2013 | 13 | |
7 | 2/13/2013 | 6 | 2 | 2013 | 13 | |
8 | 2/13/2013 | 6 | 2 | 2013 | 13 | |
9 | 2/13/2013 | 6 | 2 | 2013 | 13 | |
10 | 2/13/2013 | 6 | 2 | 2013 | 13 | |
11 | 2/14/2013 | 6 | 2 | 2013 | 14 | |
12 | 2/14/2013 | 6 | 2 | 2013 | 14 | |
13 | 2/14/2013 | 6 | 2 | 2013 | 14 | |
14 | 2/14/2013 | 6 | 2 | 2013 | 14 | |
15 | 2/15/2013 | 6 | 2 | 2013 | 15 | |
16 | 2/18/2013 | 7 | 2 | 2013 | 18 |
How to calculate the total days from first day of 2013 based on the timestamp? Thanks!
INTCK, it worked. Thanks!
INTCK, it worked. Thanks!
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.