View previous topic :: View next topic
|
Author |
Message |
yuvan
New User
Joined: 10 Jan 2006 Posts: 23 Location: India
|
|
|
|
Hi Team,
I am trying to convert a date in format yymmdd to mmddyy and could do successfully for all dattes except the date 000229 (200 -Feb-29), it is failing and converted as 999999 .
I am using below format
Y2T to Y2W
Could you please me if any thing needs to be added for the above date conversion .
Thanks
yuvan |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Please post an exact record that has failed this conversion, your full control cards and messages. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2147 Location: USA
|
|
|
|
yuvan wrote: |
Hi Team,
I am trying to convert a date in format yymmdd to mmddyy and could do successfully for all dattes except the date 000229 (200 -Feb-29), it is failing and converted as 999999 .
I am using below format
Y2T to Y2W
Could you please me if any thing needs to be added for the above date conversion .
Thanks
yuvan |
It is a very bad habit, to make people guessing what your actual code/input/output/messages are, without giving us clear information.
I only can guess that your CENTWIN option (either default, or explicit) makes SORT to consider year 00 as 2100, rather than 2000. That’s why your date 000229 is considered as 2100/02/29, which is wrong value, and replaced with 999999. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
You can raise a ticket with syncsort, if Manual says it should work.
To solve the problem , you can always reformat yymmdd to mmddyy and get going. Or you can convert yymmdd to yyyymmdd and then convert to mmddyyyy and then to mmddyy. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1341 Location: Bamberg, Germany
|
|
|
|
Sergeyken's assumption seems valid. The SYSOUT should list something like this for the given date:
Code: |
WER490I INVALID DATE ENCOUNTERED IN DATE FORMAT ARITHMETIC OR CONVERSION
WER448I Y2 FORMAT CENTURY WINDOW IS FROM 2020 TO 2119
|
It can be fixed by specifying a sliding window for ex. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2147 Location: USA
|
|
|
|
The YEAR2000 nightmare is on its way!
|
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1341 Location: Bamberg, Germany
|
|
|
|
..and the next Y10K problem is already waiting. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2147 Location: USA
|
|
|
|
Joerg.Findeisen wrote: |
..and the next Y10K problem is already waiting. |
A Top Secret info.
Prior to expected Y10K problem there are three extra planned, but less known problems: the years 3200, 6400, and 9600 are supposed to be non-leap years, despite of leap-rules based on division by 4, by 100, and by 400. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1316 Location: Vilnius, Lithuania
|
|
|
|
The first is actually 2030, as a hell of a lot of windows used to alleviate Y2K are from 1930 to 2029. When done in a sensible way, it will mean recompiling one or two modules. When not... |
|
Back to top |
|
|
|