BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
maverickkub
Obsidian | Level 7

Hi.

 

I am supposed to create a Button for Customer which can auto refresh the entire DATA based on the present DAY.

Something like stated in the picture below.sas1.png

 

 

This can easily be done with the NOW() function but now the issues is the data should be less on day from the present Day. i.e. in this case 28th August 2016.

How to achieve this?

how to get a date less than the present Date.

1 ACCEPTED SOLUTION

Accepted Solutions
maverickkub
Obsidian | Level 7

So I found the Answer Myself!!!

 

Step I:    Create a Now() field from the data.This would auto populate today's Date.

 

Step II: Create a new calcualted Item.Using Treat as fucntion and Datepart function change the Now data field to Number and Subtract the number of days you want from it as shown below:

sas2.png

 

 

 

 

Step III: USing this calucated Item crete another calculated item and again use this numeric data to chage into date itme for this time as shown below:

 

 

 

sas3.png

View solution in original post

1 REPLY 1
maverickkub
Obsidian | Level 7

So I found the Answer Myself!!!

 

Step I:    Create a Now() field from the data.This would auto populate today's Date.

 

Step II: Create a new calcualted Item.Using Treat as fucntion and Datepart function change the Now data field to Number and Subtract the number of days you want from it as shown below:

sas2.png

 

 

 

 

Step III: USing this calucated Item crete another calculated item and again use this numeric data to chage into date itme for this time as shown below:

 

 

 

sas3.png

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1284 views
  • 2 likes
  • 1 in conversation