Infosphere Datastage – Useful Date Transformations

Infosphere IIS Datastage,  Useful Date Transformations
Infosphere Datastage – Useful Date Transformations

Here are few Datastage date transformation, which I have found useful, many of these can Also be accomplished in SQL, if sourcing your data from an RDBMS.

Useful Date Transformations

ItemDescriptionResult
TomorrowDateFromDaysSince(1, CurrentDate()) 
YesterdayDateFromDaysSince(-1, CurrentDate()) 
Convert date to string with dashesDateToString((<< Date_Field or CurrentDate() >>,”%,”%YYYY-%MM-%DD”)2011-11-02
Convert date to string without dashesDateToString(<< Date_Field or CurrentDate() >>,”%YYYY%MM%DD”)20111102
Get short month nameDateToString(<< Date_Field or CurrentDate() >>,”%,”%mmm”)Feb
Get long month nameDateToString(<< Date_Field or CurrentDate() >>,”%mmmm”)February
Get short weekday nameDateToString(<< Date_Field or CurrentDate() >> date_value,”%eee”)Tue
Get long weekday nameDateToString(<< Date_Field or CurrentDate() >> ,”%eeee”)Tuesday
Irregular Date Format (months and days can be 1 or 2 digits)StringToTimestamp((<>,”%m/%d/%yyyy”)2011-11-02

Useful SQL Date Transformation References

3 thoughts on “Infosphere Datastage – Useful Date Transformations

Comments are closed.