EURDFDTw.d Format

Writes international datetime values in the form ddmmmyy:hh:mm:ss.ss or ddmmmyyyy hh:mm:ss.ss.
Category: Date and Time
Alignment: right

Syntax

EURDFDTw.d

Syntax Description

w
specifies the width of the output field.
Default:16
Range:7–40
Tip:If you want to write a SAS datetime value with the date, hour, and seconds, the width (w) must be at least 16. Add an additional two places to the width if you want to return values with optional decimal fractions of seconds.
d
specifies the number of digits to the right of the decimal point in the numeric value.
Range:1–39
Restrictions:must be less than w

If wd < 17, SAS truncates the decimal values.

Details

The EURDFDTw.d format writes SAS datetime values in the form ddmmmyy:hh:mm:ss.ss:
dd
is an integer that represents the day of the month.
mmm
is the first three letters of the month name.
yy or yyyy
is a two-digit or four-digit integer that represents the year.
hh
is the number of hours that range from 00 through 23.
mm
is the number of minutes that range from 00 through 59.
ss.ss
is the number of seconds that range from 00 through 59 with the fraction of a second following the decimal point.
You can set the language for the SAS session with the DFLANG= system option. (Because the SAS Installation Representative usually sets a default language for the site, you might be able to skip this step.) If you work with dates in multiple languages, you can replace the EUR prefix with a language prefix. See DFLANG= System Option: UNIX, Windows, and z/OS for the list of language prefixes. When you specify the language prefix in the format, SAS ignores the DFLANG= option.
Note: The EUR-date formats require European character sets and encodings. Some formats will not work correctly using non-European encodings. When running in a DBCS environment, the default format width and max width will be larger than in the single-byte system to allow formats to use a double-byte representation of certain characters. However, you must use a session encoding that supports the European characters set like UTF-8.

Example

The example table uses the input value of 1347453583, which is the SAS datetime value that corresponds to September 12, 2002, at 12:39:43 p.m. The first PUT statement assumes that the DFLANG= system option is set to German.
options dflang=german;
The second PUT statement uses the German language prefix in the format to write the international datetime value in German. The third PUT statement uses the Italian language prefix in the format to write the international datetime value in Italian. The value of the DFLANG= option, therefore, is ignored.
options dflang=german;
data _null_;
    input date;
    put date= ;
    put date eurdfdt20.;
    put date deudfdt20.;
    put date itadfdt20.; 
    datalines;  
    1347453583; 
;   
run; 
Statements
Results
----+----1----+----2
put date eurdfdt20.;
  12Sep2002:12:39:43
put date deudfdt20.;
  12Sep2002:12:39:43
put date itadfdt20.;
  12Set2002:12:39:43