Hi everyone ...
I'm fairly new to SAS and I'm trying to learn on my own.
My company uses the MXG SAS database. According to the schema of this database, I am interested in the following fields:
[tt]Variable Type Len Format Label
JINTTIME Num 8 DATETIME21.2 JOB*INITIATE*TIME
JPRNTIME Num 8 DATETIME21.2 BEGIN OF OUTPUT*PROCESSOR
JSTRTIME Num 8 DATETIME21.2 BEGIN OF EXECUTION*PROCESSOR[/tt]
The output of the DATETIME21.2 format is 17APR2008:17:06:35.97. I would like to convert this format to 108:17:06:35:97 where 108 = Julian date of 17APR2008.
In my DATA statement, I'm doing some other conversions like:
However, I cannot find any built-in SAS formats in the SAS Language Reference Dictionary that will do what I want.
Anyone have any suggestions?
I'm using SAS version 9.1 at my shop.
Thanks!
Kent
I'm fairly new to SAS and I'm trying to learn on my own.
My company uses the MXG SAS database. According to the schema of this database, I am interested in the following fields:
[tt]Variable Type Len Format Label
JINTTIME Num 8 DATETIME21.2 JOB*INITIATE*TIME
JPRNTIME Num 8 DATETIME21.2 BEGIN OF OUTPUT*PROCESSOR
JSTRTIME Num 8 DATETIME21.2 BEGIN OF EXECUTION*PROCESSOR[/tt]
The output of the DATETIME21.2 format is 17APR2008:17:06:35.97. I would like to convert this format to 108:17:06:35:97 where 108 = Julian date of 17APR2008.
In my DATA statement, I'm doing some other conversions like:
Code:
HOU1 = HOUR(JENDTIME);
DATE = DATEPART(JSTRTIME);
DAT1 = DATEPART(JENDTIME);
QUETIME = JSTRTIME - JRDRTIME;
MONTH = MONTH(DATEPART(JSTRTIME));
However, I cannot find any built-in SAS formats in the SAS Language Reference Dictionary that will do what I want.
Anyone have any suggestions?
I'm using SAS version 9.1 at my shop.
Thanks!
Kent