BookmarkSubscribeRSS Feed
Andalusia
Obsidian | Level 7

Hello,

 

In SAS EG I have DATETIME values like this with format DATETIME22.3:

25JUN2014:08:10:55.340

When I open the same data in VA I receive the data like this:

25JUN2014:08:10:55


Why is the last part ''.340'' gone? I also cant adjust the format because all I get is this:

 

Andalusia_0-1606390232756.png

 


A critical note: I use SAS VA 7.5

3 REPLIES 3
PetriRoine
Pyrite | Level 9

Hello @Andalusia 

 

Many new date formats were introduced in VA8.3, including millisecond, week and quarter formats. My understanding is that VA7.5 doesn't support milliseconds. Sorry about that.

 

Best regards,

Petri

Andalusia
Obsidian | Level 7
It seems to me that a lot of people are struggling with this. Are their really no other ways to tacke this problem?
FalkoSchulz
SAS Employee

What about this as work-around. Keep a separate column carrying the value in milliseconds in your data for VA. Let's call this column 'milliseconds'.

 

In VA - create a new calculated field using formula (dtime being your datatime column)

Concatenate(Concatenate(Concatenate(Format('dtime'n[Raw],
'DTDATE7.'), ' '), Concatenate(Format(Hour('dtime'n), 'Z2.0'),
Concatenate(':', Format(Minute('dtime'n), 'Z2.0')))), Concatenate
(':', Format(( Second('dtime'n) + 'milliseconds'n ), 'COMMA6.3')))

 

..and use that as category role in standard line or other charts. Sorry for the rather long formula - but it's pretty much just taking apart the datetime information and concatenates the milliseconds into the given string so that information isn't lost when rendering. Only disadvantage is, that the given field is of character type but shouldn't matter too much for you rendering unless you plan some advanced time based calculations. You may also have to tweak above formula if you encounter any sorting issues given this is now sorted by the character value (e.g. by using YY/MM/DD numeric formatting instead)

 

Hope this helps. Falko

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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
  • 3 replies
  • 1389 views
  • 0 likes
  • 3 in conversation