Help using Base SAS procedures

creating datetime format with

Reply
N/A
Posts: 0

creating datetime format with

is it possible to create a format using date/time directives for the PICTURE
http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002473467.htm#a000530223 and still show (decimal) fractions of a second
????????????????????

My first efforts don't do what is needed[pre] PROC FORMAT ;
picture uxdt /* format for excel import */
other = '%0d/%0m/%0Y %0H:%0M:%0S.99'( datatype=datetime) ;
run;

%let test = 12dec2008:12:12:12.34 ;
%PUT %sysfunc( putn( "&test"dt, uxdt22.1))
%SYSFUNC( putn( "&test"dt, datetime22.1)) ;

1020 %let test = 12dec2008:12:12:12.34 ;
1021 %PUT %sysfunc( putn( "&test"dt, uxdt22.1))
1022 %SYSFUNC( putn( "&test"dt, datetime22.1)) ;
12/12/2008 12:12:12.99 12DEC2008:12:12:12.3
[/pre]

In the documentation I can find no reference to fractions of a second in date/time datatype pictures ~ but maybe I missed it.


PeterC

added saslog


Message was edited by: Peter_c Message was edited by: Peter_c
Ask a Question
Discussion stats
  • 0 replies
  • 79 views
  • 0 likes
  • 1 in conversation