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

columns with dates and characters to dates

Reply
Contributor
Posts: 25

columns with dates and characters to dates

[ Edited ]

i've column containing dates as applicable and other field as value -Not Available-

sas va has considered that column as character and converted dates into numbers like 42494 (expectedly).

now I want to use those dates in to analysis..

any Idea on how to consider only numbers from that column and converting that numbers into dates ..

date format is mmddyy8.

 

Capture.PNG

SAS Employee
Posts: 35

Re: columns with dates and characters to dates

makarand:

 

Are you looking for this? That is, converting numerics (that are actually SAS numerics from data formats) back to date format?

If so, the same TreatAs function that converts dates to numerics can also convert numerics back to dates.

For example (and this is just from a random Google search):

http://www.listendata.com/2016/06/visual-analytics-convert-numeric-variable-to-date.html

 

Or ... are you actually looking to do this instead?  That is, convert a custom numeric format that is date to you (e.g. 20150223) and you want it to be a date to Visual Analytics?  If so, something like that is going to require using SAS Visual Data Builder because formulas like this are not possible directly within Visual Analytics Explorer or Designer:

https://communities.sas.com/t5/SAS-Visual-Analytics/SAS-Numeric-to-Date-in-SAS-VA/td-p/189680

 

Or ... perhaps I'm missing what you are actually after and neither of above are applicable to your question?

 

Hope this helps,

Ted Stolarczyk, SAS Customer Loyalty team

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 265 views
  • 0 likes
  • 2 in conversation