current date () - 6 months

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

priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

ray.wurlod wrote:
priyadarshikunal wrote:Depends on the definition on 6 months.
No it doesn't. I understand the requirement to be "the date 6 months prior to current date". ...
Apologies for ambiguous statement. The question in my mind at that time was

In case the date is 2011-03(-01) which will produce 2010-08(-30). Definition of 6 months remains constant but there seems to be a deviation from that definition (the result in first post and the result date after substracting 183 day).

Regards,
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Tejas Pujari
Participant
Posts: 14
Joined: Thu Jul 10, 2008 7:37 am
Location: mumbai

Post by Tejas Pujari »

priyadarshikunal wrote:
ray.wurlod wrote:How about DateFromDaysSince() with an offset of -183 ? ...
Depends on the definition on 6 months. it can be either that or

Code: Select all

if(link.field[5,2] <=6) Then (link.field[1,4]-1):12+link.field[5,2] - 6 else link.field[1,4]:link.field[5,2]-6
Why offset -183? will it suffice leap year and non leap year
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Closely enough for most purposes.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply