NLDATM Function
Converts the SAS datetime value to the time value
of the specified locale by using the datetimeformat descriptors.
Syntax
NLDATM(datetime,descriptor)
Required Arguments
 datetime

specifies a SAS datetime
value.
 descriptor

is a variable or expression
that specifies how dates and times are formatted in output. The following
descriptors are case sensitive:
 #

removes the leading
zero from the result.
 %%

specifies the % character.
 %a

specifies the shortweekday
descriptor. The range for the day descriptor is Mon–Sun.
 %A

specifies the longweekday
descriptor. The range for the longweekday descriptor is Monday–Sunday.
 %b

specifies the shortmonth
descriptor. The range for the shortmonth descriptor is Jan–Dec.
 %B

specifies the longmonth
descriptor. The range for the longmonth descriptor is January–December.
 %c

specifies the longmonth
descriptor and uses blank padding. The range for the longmonth descriptor
is January–December.
 %d

specifies the day descriptor
and uses 0 padding. The range for the day descriptor is 01–31.
 %e

specifies the day descriptor
and uses blank padding. The range for the day descriptor is 01–31.
 %F

specifies the longweekday
descriptor and uses blank padding. The range for the day descriptor
is Monday–Sunday.
 %H

specifies the hour
descriptor that is based on a 24hour clock. The range for the hour
descriptor is 00–23.
 %I

specifies the hour
descriptor that is based on a 12hour clock. The range for the hour
descriptor is 01–12.
 %j

specifies the dayofyear
descriptor as a decimal number and uses a leading zero. The range
for the dayofyear descriptor is 1–366.
 %m

specifies the month
descriptor and uses 0 padding. The range for the month descriptor
is 01–12.
 %M

specifies the minute
descriptor. The range for the minute descriptor is 00–59.
 %o

specifies the month
descriptor and uses blank padding. The range for the month descriptor
is 1–12.
 %p

specifies a.m. or p.m.
descriptor.
 %S

specifies the second
descriptor. The range for the second descriptor is 00–59.
 %u

specifies the weekday
descriptor as a number in the range of 1–7 that represents
Monday–Sunday.
 %U

specifies the weeknumberofyear
descriptor by calculating the descriptor value as the SAS date value
and uses the numberofweek value within the year (Sunday is considered
the first day of the week). The numberofweek value is represented
as a decimal number in the range 0–53. A leading zero and a
maximum value of 53 is used.
 %V

specifies the weeknumberofyear
descriptor by calculating the descriptor value as the SAS date value.
The numberofweek value is represented as a decimal number in the
range 01–53. A leading zero and a maximum value of 53 is used.
Weeks begin on a Monday and week 1 of the year is the week that includes
both January 4th and the first Thursday of the year. If the first
Monday of January is the 2nd, 3rd, or 4th, the preceding days are
part of the last week of the preceding year.
 %w

specifies the weekday
descriptor as a number in the range of 0–6 that represents
Sunday–Saturday.
 %W

specifies the weeknumberofyear
descriptor by calculating the descriptor value as SAS date value using
the number of week within the year (Monday is considered the first
day of the week). The numberofweek value is represented as a decimal
number in the range of 0–53. A leading zero and a maximum value
of 53 are used.
 %y

specifies the year
(2digit) descriptor. The range for the year descriptor is 00–99.
 %Y

specifies the year
(4digit) descriptor. The range for the year descriptor is 1970–2069.
Details
The NLDATM function
converts the SAS datetime value to the datetime value of the specified
locale by using the datetime descriptors.
Example
The following example
shows a time (a.m or p.m.) that is created from a SAS datetime value.




time_ampm=nldatm('24Feb2003:12:39:43'dt,'%I%p');


time_ampm=nldatm('24Feb2003:12:39:43'dt,'%I%p');

