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

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

1 ACCEPTED SOLUTION

Accepted Solutions
SilinBorro
Quartz | Level 8

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

14 REPLIES 14
PeterWijers
Lapis Lazuli | Level 10

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.

MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
SilinBorro
Quartz | Level 8

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

MichelleHomes
Meteorite | Level 14

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.

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
SilinBorro
Quartz | Level 8

Snap 2015-01-28 at 11.11.21.jpg

Thnaks!

SilinBorro
Quartz | Level 8

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

Snap 2015-01-28 at 11.32.38.jpg

RDHamm
Fluorite | Level 6

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.

SilinBorro
Quartz | Level 8

I´ll check it

thanks!!!!

SilinBorro
Quartz | Level 8

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!

SilinBorro
Quartz | Level 8

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!

RDHamm
Fluorite | Level 6

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

SilinBorro
Quartz | Level 8

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

MichelleHomes
Meteorite | Level 14

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

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
KarunaT
Fluorite | Level 6

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.

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
  • 14 replies
  • 3664 views
  • 7 likes
  • 5 in conversation