View previous topic :: View next topic
|
Author |
Message |
madishpa
New User
Joined: 18 May 2007 Posts: 28 Location: Hyderabad
|
|
|
|
Hello All,
Select records of prior month from the file
Input file:
01xxxxxxxxxx
02xxxxxxxxxx
06xxxxxxxxxx
05xxxxxxxxxx
05VVVVVVVVV
Output file:
05xxxxxxxxxX
05VVVVVVVVV
What date function in DFSORT is to be applied to select prior month records. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
As with your other question, what do you want to use for the "current month"? Is it the same at one minute past midnight on the first of the months? |
|
Back to top |
|
|
madishpa
New User
Joined: 18 May 2007 Posts: 28 Location: Hyderabad
|
|
|
|
I am primarly looking for the date function which selects records of particular month.
I have seen date functions thru which we can apply selection criteria on YYYYMMDD, YYYY, MMDDYY and other many formats.
I don't know how to apply selection criteria on only month field.
Can some one help me on this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you post some sample input data (maybe only the date field(s) and the output you want when your process is run. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
madishpa wrote: |
I am primarly looking for the date function which selects records of particular month.
I have seen date functions thru which we can apply selection criteria on YYYYMMDD, YYYY, MMDDYY and other many formats.
I don't know how to apply selection criteria on only month field.
Can some one help me on this. |
madishpa,
You just cannot apply only the MONTH as selection criteria when selecting records from prior month. You would need the year also. For example if the current month is January you need the records from December of last Year. So you need to have the year along with date.
use DATE2-1 which will give you last month date as CCYYMM. You can use this date in INCLUDE/OMIT condition |
|
Back to top |
|
|
|