![]() It is tricky to figure out the date when it was last tuesday. For example, today is 09January, 2017 and the first day of this date is 01January,2017.īy specifying 0 in the third parameter of INTNX function, we can calculate the first day of the dates. Suppose you need to find out the first day of a specific date. Nextsunday=intnx('week', mydate, 1, 'sameday') returns 09JAN2017 3. If you want to add exactly 1 week to the date, you can use the 'sameday' in the fourth parameter of this function. In other words, if you change the mydate to '04JAN2017'd, it still returns '08JAN2017' as the next sunday would be same within this week interval. The 'beginning' alignment is default in INTNX function. It returns 08JAN2017 as it aligns to the 'beginning' period. In the following code, we are adding seven days to 02 January 2017. Default value - 'beginning'.īelow is a list of some examples in which we have demonstrated the INTNX function in SAS. The values you can specify - 'beginning', 'middle', 'end', 'sameday'. Alignment is where datevalue is aligned within interval prior to being incremented.Increment is number of intervals by which date is incremented. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |