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

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

Thanks, Jane

 

TreatAs.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

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

1 REPLY 1
BrunoMueller
SAS Super FREQ

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

sas-innovate-2024.png

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.

 

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
  • 2593 views
  • 0 likes
  • 2 in conversation