Chapter Contents

Previous

Next
PDJULIw.

PDJULIw.



Writes packed Julian date values in the hexadecimal format ccyydddF for IBM

Category: Date and Time


Syntax
Syntax Description
Details
Examples
See Also

Syntax

PDJULIw.

Syntax Description

w
specifies the width of the output field.
Default: 4
Range: 4


Details

The PDJULIw. format writes SAS date values in the form ccyydddF, where

cc
is the one-byte representation of a two-digit integer that represents the century.

yy
is the one-byte representation of a two-digit integer that represents the year. The PDJULIw. format makes an adjustment for the century byte by subtracting 1900 from the 4-digit Gregorian year to produce the correct packed decimal ccyy representation. A year value of 1998 is stored in ccyy as 0098, and a year value of 2011 is stored as 0111.

ddd
is the one-and-a-half byte representation of the three-digit integer that corresponds to the Julian day of the year, 1-365 (or 1-366 for leap years).

F
is the half byte that contains all binary 1s, which assigns the value as positive.

Note:   SAS interprets a two-digit year as belonging to the 100-year span that is defined by the YEARCUTOFF= system option.  [cautionend]


Examples

juldate = put(date, pdjuli4.);
put juldate $hex8.; 

SAS date value Results*
13881
0098002F
18630
0111003F
*The result is a hexadecimal four-byte packed decimal Julian date in the format of ccyydddF. The first SAS date value represents the date of January 2, 1998. The second SAS date value represents the date of January 3, 2011.


See Also

Formats:

PDJULGw.
JULIANw.
JULDAYw.

Functions:

DATEJUL
JULDATE

Informats:

PDJULGw.
PDJULIw.
JULIANw.

System Option:

YEARCUTOFF=


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.