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

Simply import csv file with date format into sas visual analytics

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

Simply import csv file with date format into sas visual analytics

Dear all,

I'm connected to SAS VA 7.3 on the web interface, have opened the "data preparation" section and used the "File->Import" functionality with CSV.

Selecting my CSV file, I'm just setting the separator character and cliking on import.

It goes fine except I have 2 date fields which are not taken as date field but characters only in the report designer. this is painful.

I tried to save the csv as .xlsx file and import it, as one of the two date fields is correctly managed as a date column in excel ( the Date column), but it does not make a difference.

Any idea ?

thanks

 

Sample of the fields in CSV :

Start;Date

28 octobre 2015;20151028

29 octobre 2015;20151029

30 octobre 2015;20151030

 

etc...

 

 

2017-09-13_14-40-59.png2017-09-13_14-52-41.png

 


Accepted Solutions
Solution
‎09-14-2017 12:05 PM
Occasional Contributor
Posts: 18

Re: Simply import csv file with date format into sas visual analytics

OK for those who are interested.... I solved the problem because on the thousands lines of data, only a few did not have a correct date in the column, but a N/A text instead.

I think this lead to SAS not understand the column as a date value...

PRoblem solved, thanks anyway.

 

View solution in original post


All Replies
Super User
Posts: 10,623

Re: Simply import csv file with date format into sas visual analytics

Doesn't the "advanced" option allow you to set column atttributes? The Date field can be read with the yymmdd8. informat.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Occasional Contributor
Posts: 18

Re: Simply import csv file with date format into sas visual analytics

Posted in reply to KurtBremser
Unfortunately not, it's only the location / directory of LASR tables & compression option.

Super User
Posts: 13,950

Re: Simply import csv file with date format into sas visual analytics

That's not a date, it is a datetime.

Occasional Contributor
Posts: 18

Re: Simply import csv file with date format into sas visual analytics

ok but how can I change this field to a datetime then ?

I tried in data preparation to force it using a query but does not work either.

 

Solution
‎09-14-2017 12:05 PM
Occasional Contributor
Posts: 18

Re: Simply import csv file with date format into sas visual analytics

OK for those who are interested.... I solved the problem because on the thousands lines of data, only a few did not have a correct date in the column, but a N/A text instead.

I think this lead to SAS not understand the column as a date value...

PRoblem solved, thanks anyway.

 

☑ This topic is solved.

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

Discussion stats
  • 5 replies
  • 409 views
  • 0 likes
  • 3 in conversation