Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Convert numeric value to date in VA Exploration 7.3

Accepted Solution Solved
Reply
Senior User
Posts: 1
Accepted Solution

Convert numeric value to date in VA Exploration 7.3

I get the following results when trying to convert numeric to date using TreatAs in VA Exploration.  Any suggestions?

Thanks, Jane

 

TreatAs.PNG


Accepted Solutions
Solution
‎06-07-2017 09:24 AM
SAS Super FREQ
Posts: 684

Re: Convert numeric value to date in VA Exploration 7.3

Hi

 

If possible, I would change the datasource, so that the value is already a proper date. If this is not possible, you can use the Format and Parse Operators to convert it like so

Parse(Format('someDate'n, 'BEST8.'), 'ANYDTDTE8.')

The TreatAs will convert a numeric value representing a SAS date to a date

View solution in original post


All Replies
Solution
‎06-07-2017 09:24 AM
SAS Super FREQ
Posts: 684

Re: Convert numeric value to date in VA Exploration 7.3

Hi

 

If possible, I would change the datasource, so that the value is already a proper date. If this is not possible, you can use the Format and Parse Operators to convert it like so

Parse(Format('someDate'n, 'BEST8.'), 'ANYDTDTE8.')

The TreatAs will convert a numeric value representing a SAS date to a date

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 123 views
  • 0 likes
  • 2 in conversation