Hi
I have date column like 20070203
20070912
........the format is yyyymmdd in text file i want to split month only ie 02
09...
How to achive it in parallel? what function should be used?
thanks
Balaji G
month from date
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you have a Date column is does NOT have a format: your Sequential File stage specifies the date format in the file and the import operator looks after it. If it's a Char or VarChar data type then the format is important.
There are date conversion functions both for the Modify stage and for the Transformer stage for extracting components from dates.
There are date conversion functions both for the Modify stage and for the Transformer stage for extracting components from dates.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 50
- Joined: Fri Dec 21, 2007 3:24 am
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
you can use substring in PX too.consulting wrote:Thanks
In server we can use substring. How about in Px?
Code: Select all
datecolumn[5,6]
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
ONLY if it is a string. If it is a date, you need to apply a date to string conversion function first.
There are other functions available that will extract date components directly from dates.
There are other functions available that will extract date components directly from dates.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.