IConv, Century change Range

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
lateshj
Participant
Posts: 12
Joined: Wed Nov 05, 2003 11:54 pm

IConv, Century change Range

Post by lateshj »

Hi,

I have written a very simple routine as below.
PDate = Trim(Arg1)

IDate = Iconv(PDate,"D")

Ans = Oconv (IDate, "D")

Following are some test results
Case 1
Input : 09-09-29
Output: 09 SEP 2029

Case 2
Input : 09-09-30
Output: 09 SEP 1929

Can you let me know how does the Century change from year 29 to 30. Is this some kind of standard rule or is it configurable in DS ?

Thanks
Latesh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It is defined in your uvconfig file and the default is 1930 (which is pretty standard):

Code: Select all

# CENTURYPIVOT - This sets the Century Pivot Year.
#   This value determines how 1 and 2 digit years are
#   interpreted by ICONV.  A value of 1930 means that
#   30 through 99 are interpreted as the 1900s, and 00
#   through 29 mean 2000 - 2029.  If this value is two
#   digits, then the Century Pivot Year is based on the
#   current year, as follows.  A value of 30 means the
#   Century Pivot Year will be 1930 in 2000, 1931 in
#   2001, 1932 in 2002, etc.
CENTURYPIVOT 1930
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply