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

about dates

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 77
Accepted Solution

about dates

Hi,

I 'm building a report in Visual Analytics ,

I´ve imported an excel sheet , mi date fields are in SAS format , numbers,  hoy do I show them in a line graphic as DDMMYY?

thanks in advance

Silvia


Accepted Solutions
Solution
‎01-29-2015 12:38 PM
Frequent Contributor
Posts: 77

Re: about dates

Hi RDHamn,

I reviewed my excel sheet (generated by a sas program from an oracle table )  and I realized that  whenever I hadn´t a date , there vas a dot (SAS symbol for missing) and that is why VA considered it alpha.

Thanks a lot to those who has helped me with this!!!!1

View solution in original post


All Replies
Regular Contributor
Posts: 172

Re: about dates

Hi Silvia,

there are several grafics with time axis where you can use dates as x-axis.

the dates should be imported and accepted as a date format. You can set the display format yourselves.

if not, there is something wrong with the field that represents your dates.

i am not sure if you need a sample here.

greetings and success.

Peter.

Super User
Posts: 1,208

Re: about dates

Hi Silvia,

When you import the data into SAS Visual Analytics, the data item will be regarded as a date if it is a date category classification. Does it have a calendar with a time icon in front of it? If so, you can select it and then change the format from the data property panel in the data pane in the left pane. As per the screen shot. format.png

Then you can use them in a line chart as explains.

If you could provide a sample or screenshot of your data that would help the community to get a better understanding of your question.

Kind Regards,

Michelle

Frequent Contributor
Posts: 77

Re: about dates

Hi,

When I import my excel sheet the date fields appear with an $ format not as dates. You´ll see it in the image ( e.g. " Fecha .  1ra respuesta) I tried to change them into date format but I couldn´t. I tried creating a calculated item as well but  the expression was not correct. Any suggestion????

Thanks a lot!!!

Silvia

Snap 2015-01-28 at 08.10.47.jpg

Super User
Posts: 1,208

Re: about dates

Is it possible for you to share a sample of your excel data? Is the column formatted with an Excel date format? It seems that the column may be a character column in Excel and that is why it is treated as a Category classification with a $ format when you import it into SAS VA.

Frequent Contributor
Posts: 77

Re: about dates

Snap 2015-01-28 at 11.11.21.jpg

Thnaks!

Frequent Contributor
Posts: 77

Re: about dates

I capture the definition in Excel for one of the columns of date

Snap 2015-01-28 at 11.32.38.jpg

Occasional Contributor
Posts: 6

Re: about dates

Hi.

I have had this happen to me as well.

Check your empty cells in Excel (I saw one on one of your screenshots)  Make sure there is nothing in those cells by the =len() function.

If there is any text at all in those columns, they will come in as non-Date fields.

You may need to check, or delete  the rows at the bottom of the spreadhseet too.

Best of luck.

Frequent Contributor
Posts: 77

Re: about dates

I´ll check it

thanks!!!!

Frequent Contributor
Posts: 77

Re: about dates

HI,

I chequed it but there ´s no spaces in the field, just the date. SAS detects these fields as dates because converts them into SAS format. but then the properties show $.

but I think the same that you that its because of Excel, buy I don´t get it.

I´ll go on searching

thanks!

Frequent Contributor
Posts: 77

Re: about dates

Investigating Excel I realized that the  field has got the date format,

but Excel converts it into  a serie number, and what I thought was the SAS format in Analytics is the number assigned by Excel. not the date in SAS format.

what a mess!

Occasional Contributor
Posts: 6

Re: about dates

Attached is an image of an Excel file that I have uploaded numerous times.  This works for me.  I use the Date format in Excel.  I don't have any missing dates, and each date column is formatted as Date except for the first row where the field names are.

I have had issues in the past, and it has always been because of text formatted date fields or spaces (or dots) where there should be nothing.

importDates.jpg

Solution
‎01-29-2015 12:38 PM
Frequent Contributor
Posts: 77

Re: about dates

Hi RDHamn,

I reviewed my excel sheet (generated by a sas program from an oracle table )  and I realized that  whenever I hadn´t a date , there vas a dot (SAS symbol for missing) and that is why VA considered it alpha.

Thanks a lot to those who has helped me with this!!!!1

Super User
Posts: 1,208

Re: about dates

Great to hear Silvia!

Please mark the question as answered so that future members who come across this know it has been resolved.

Kind Regards,

Michelle

Senior User
Posts: 1

Re: about dates

To convert a character date into Date format, you can use the following:


In the Report designer, create a 'New Calculated Item' and use the Parse operator(under simple text).

 

For example, Parse('Joining_date', 'DATE9.') returns  a date value where 'Joining_date' is my Date column name and 'DATE9.' is the date format.

Post a Question
Discussion Stats
  • 14 replies
  • 789 views
  • 7 likes
  • 5 in conversation