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

about converting item from character to date

Reply
Frequent Contributor
Posts: 77

about converting item from character to date

Hi,

I've imported an excel  file  into VA,

I've got a field  which is a timestamp  (dd/mm/yyyy:hh:mm) , but it is taken as character  by VA.

if I create a calculated item , how can I convert it from char to date?...

any idea about the instruction?

thanks a lot!

Silvia

SAS Super FREQ
Posts: 410

Re: about converting item from character to date

You might be encountering the issue in 52060 - SAS® Visual Analytics might import date values in a Microsoft Excel spreadsheet as character.... Can you confirm that the value in Excel is truly stored as time?

SAS Super FREQ
Posts: 287

Re: about converting item from character to date

Hi Silvia,

I believe that the Parse() operator should do what you need.

https://support.sas.com/documentation/cdl/en/vaug/67500/HTML/default/viewer.htm#n1sxztiscf7jofn1iys4...

Parse() is categorized as a "Text (simple)" operator. Select the ANYDTDTE format to return a date value, or ANYDTDTM to return a date-time value.

Hope that helps!

Sam

Super User
Posts: 1,231

Re: about converting item from character to date

Could it be that you're experiencing a similar issue as before? https://communities.sas.com/thread/64936

Please check your Excel file for any characters in the column. If there are missing dates, how are they represented?

Kind Regards,

Michelle

Ask a Question
Discussion stats
  • 3 replies
  • 1002 views
  • 1 like
  • 4 in conversation