Next working date
HI,
Can anyone help me with a function to find the next working date excluding holidays from a table 'holidays'
The input to the function would be a date and output as well.
Thanks
Hi,
Assuming work days are Monday through Friday, and all dts in the holiday table are at midnight:
FUNCTION next_work_day (in_dt IN DATE)
RETURN DATE
DETERMINISTIC
IS
-- next_work_day returns the frist working day (that is, anything except Saturday, Sunday or days
-- in the holiday table) after (not including) in_dt.
-- The value returned is always midnight (00:00:00).
junk PLS_INTEGER;
return_dt DATE := TRUNC (in_dt);
BEGIN
LOOP
return_dt := return_dt +
CASE return_dt - TRUNC (return_dt, IW')
WHEN 4 THEN 3 -- Friday -> Monday
WHEN 5 THEN 2 -- Saturday -> Monday
ELSE 1
END;
SELECT 1
INTO junk
FROM holidays
WHERE dt = return_dt;
-- If the SELECT statement above didn't raise an error, this is a holiday,
-- so repeat the loop and try the next day
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
RETURN return_dt;
END next_work_day;This solution does not depend on NLS settings.
(Untested.)
Edited by: Frank Kulash on Jun 4, 2009 3:58 PM
Similar Messages
-
How to get the next working date?
Hi,
I need to extract data between the 2nd of the month, and second working date of the following month.
Here is the code I have to check if the date is a weekend, and check if it is in the Holidays table (for UK Holidays):
(This code is to check against Easter 2014, so Good Friday was on the 18th of April, Easter Monday was on the 21st, and the date I want returned is Tuesday the 22nd but I cannot get it working correctly).
declare @LatestDate datetime
set @LatestDate = DATEADD(m,-9,getdate()) -- cast('01/11/2014' as datetime) --dateadd(m,1,datediff(d,0,'01/11/2014'))
set @LatestDate = DATEADD(d,13,@LatestDate)
print @LatestDate
if datepart(dw,@LatestDate) in (1,7)
Begin
while datepart(dw,@LatestDate) in (1,7)
OR
exists (select * from Hermes_Rep..Holidays where Holiday =right(CONVERT(CHAR(10), @LatestDate, 101),4) + '-' + left(CONVERT(CHAR(15), @LatestDate, 101),2) + '-' + SUBSTRING(CONVERT(CHAR(15), @LatestDate, 101),4,2))
Begin
set @LatestDate=DATEADD(d,1,@LatestDate)
End
End
What I need is for my code to always return the 2nd working day of any month, taking into account weekends, and Holidays in the Holidays table.
The Holidays table has dates in the format '2014-04-18 00:00:00' (for Good Friday 2014)Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI-ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI-ISO Standard SQL. And you need to read and download the PDF for:
https:--www.simple-talk.com-books-sql-books-119-sql-code-smells-
>>Here is the code I have to check if the date is a weekend, and check if it is in the Holidays table (for UK Holidays): <<
Do you know what a calendar table is?
>> (This code is to check against Easter 2014, so Good Friday was on the 18th of April, Easter Monday was on the 21st, and the date I want returned is Tuesday the 22nd but I cannot get it working correctly). <<
Catholic or Orthodox Easter? This is one of many reasons we do not use computations in SQL. What you did is the wrong approach done with bad programming. For example, we do not use the old Sybase getdate() now. The only display format allowed in
ANSI/ISO Standard SQL, but you used a local dialect!
COBOL treats dates as strings like you did; SQL has a temporal data type.
>> What I need is for my code to always return the 2nd working day of any month, taking into account weekends, and Holidays in the Holidays table. <<
The idea of a Holiday table is bad; why are these dates totally different entities from other dates? Would you split Personnel on sex and have “Male_Personnel” and “Female_Personnel”?
The Julian business day is a good trick. Number the days from whenever your calendar starts and repeat a number for a weekend or company holiday.
CREATE TABLE Calendar
(cal_date DATE NOT NULL PRIMARY KEY,
julian_business_nbr INTEGER NOT NULL,
INSERT INTO Calendar
VALUES ('2007-04-05', 42),
('2007-04-06', 43), -- good Friday
('2007-04-07', 43),
('2007-04-08', 43), -- Easter Sunday
('2007-04-09', 44),
('2007-04-10', 45); --Tuesday
To compute the business days from Thursday of this week to next
Tuesdays:
SELECT (C2.julian_business_nbr - C1.julian_business_nbr)
FROM Calendar AS C1, Calendar AS C2
WHERE C1.cal_date = '2007-04-05',
AND C2.cal_date = '2007-04-10';
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Code or function to generate next working date for a given date
hi,
First lets see the table struncture and table data.
CREATE TABLE LT_CA_HOLIDAYS
HOLIDAY_DATE DATE NOT NULL,
IS_BANK_HOLIDAY CHAR(1 BYTE) NOT NULL,
DISPLAY_NAME VARCHAR2(35 BYTE) NOT NULL
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('12/25/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Christmas Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('01/01/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'New Years Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('01/17/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Martin Luther King Jr');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('02/21/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Washington s B-Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('05/30/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Memorial');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('07/04/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Independence Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('09/05/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Labor Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('10/10/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Columbus Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('11/11/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Verterans Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('11/24/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Thanksgiving Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('12/25/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Christmas Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('12/26/2011 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Bank Observed Christmas');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('01/01/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'New Years Day');
Insert into LT_CA_HOLIDAYS
(HOLIDAY_DATE, IS_BANK_HOLIDAY, DISPLAY_NAME)
Values
(TO_DATE('01/02/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'Y', 'Bank Observed New Years Day');
COMMIT;.
The requirement goes something like this:
Weekend days SATURDAY and SUNDAY ARE CONSIDERED holidays.
The list of holidays are in LT_CA_HOLIDAYS.
We will be given a date as p_processdate.we need to check if p_processdate is a holiday or a working day,
if p_processdate is a holiday then we need to generate the next working day .
If p_processdate is a working day we need to test whether p_processdate +1 is a working day, IF p_processdate+1 is a holiday then
we need to generate the next working day near to p_processdate + 1.
RegardsDECLARE
day_param date:=TO_DATE('01/16/2011','MM/DD/YYYY');--- SET your input date
n_yes number;
BEGIN
LOOP
day_param:=day_param+1;
select count(*) into n_yes from LT_CA_HOLIDAYS WHERE TO_CHAR(HOLIDAY_DATE,'MM/DD/YYYY')=TO_CHAR(day_param ,'MM/DD/YYYY') ANd IS_BANK_HOLIDAY='Y' ;
IF(to_char (day_param,'DY') NOT IN ('SAT','SUN')) AND n_yes=0 THEN
EXIT;
END IF;
END LOOP;
DBMS_output.put_line('output'||day_param);
END;OUTPUT
output18-JAN-11
Edited by: Leonard on Aug 26, 2011 5:13 AM -
CALCULATE THE NEXT WORKING DATE ACCORDING TO THE CALENDAR
Hello,
Could somebody tell me the name of any function module or abap class to determine the next working day according to calendar. I need add (let say) 30 days to the date but only working days (I dont take into acount sunday, easter etc.)
Thanks in Advance
Adamtry function BKK_ADD_WORKINGDAY
or WDKAL_DATE_ADD_FKDAYS
Cheers
Thomas -
Netdue date alteration with next working day
Hi,
I have one report for Accounts Receivables .
In this when net due date falls on holiday, i need to shift this "net due date" to a next working day.
I have one FM "DATE_CONVERT_TO_FACTORYDATE" which i can use for the purpose.
As a input to this FM we need to give Factory calendar ID which is an attribute to Infoobject 0PLANT.
Unfortunately i do not have 0PLANT in my datamodel. But i do have 0COMP_CODE in my datamodel.
As i do not have any link between Factory calendar ID and 0COMP_CODE i am searching for an appropriate solution so that i could use this FM to shift net due date to Next working if the net due date is an holiday.
Any Ideas?Simran
I am not sure if we can get a direct link from 0plant to 0comp_code, but you can enhance the master data of the 0company code to add the factory caledar and load them manually into 0plant.
Let me know if this helps..
Regards,
Avinash -
Billing date of 2nd/4th saturday getting pushed to next working day.
whenever my client trying to create bill of service order, bills on 2nd/4th saturday, the billing date is getting pushed to next working day. I checked their calender, they have maintained 2nd/4th saturday as holiday in holiday calender. However the validity is only till 2009. But the bills are getting still getting pushed. Am not too keen on using validation, please help.
Hi,
Are they creating invoices thru back ground ( using batch job ) ? in this case in the holiday calendar 2n'd and 4'th saturday is holiday, so the system is proposing new work day. you have to check all the three calendars once again let me know.
Thanks,
Chandu. -
Next inspection date is not updated in batch / prposed at the time of UD
Hi
I have configurted the system for retest of batches, the system successfully creates the inspection lot but when does not propose next inspection date at the time of UD nor it updates in Batch Master.
I entered inspection interval days in QM View, the system entered the first inspection date correctly. Also Batch Restriction is working properly.
Kindly help.
regards
MobashirHi Shaymal & VRMP
I have checked the system, the only problem I am facing is that the system does not show next inspection date dialog box at the time of UD where I can see the next inspection date being set by the system
Say, I use QA07 (Triggered Manually) on 19.jan.08. The Next inspection date was 26.jan.08 and Initial Run in Days was 10 (days), the system created inspection lot on 19.jan.08 successfully. At the time of UD it automatically set 29.jan.08 as the next inspection date (i.e. 19.jan.08 + 10 days) istead of 06. Feb.08 (i.e. 26.jan.08 + 10 days) without showing dialog box / suggesting next inspectino date.
regards
Mobashir
Edited by: Muhammad Mobashir on Jan 19, 2009 7:11 AM -
How to set start of cycle/next planned date at the Maintenance Item level??
Hi All,
We are uploading a bulk of Strategy Maintenance Plans into the system. Each plan has multiple maintenance items and each maintenance item in a plan having different next due dates. Now if we set the Start of cycle at the Maintenance Plan level, then the next due dates of the maintenance items in that plan would be calculated on the basis on Start of Cycle (Common for all) and frequency as set in MPackages in an item Task list. Since each Maintenance item may have different Frequency and next due date, generating a call object while scheduling the plan correctly to satisfy at the Maintenance item level is not seeming possible.
Can someone please suggest as to how do I set the Start of cycle or say Next Planned Date or Last Scheduled date at the Maintenance Item level either through configuration or programmatically.We are working on an SAP 4.6C version.It is urgent!!!hi
i think specifying start of the cycle for each maintenance level is not possible ,since start of the cycle refers to maintenance plan only .
for SAP standard kindly refer the following [link|http://help.sap.com/saphelp_46c/helpdata/en/94/43a968abc011d395bd00a0c93029cf/content.htm]
it is better to create one maintenance item per maintenance plan,if you want to control each maintenance item independently
regards
thyagarajan -
"Inspection interval" is defined in the QM view of Material Master, and the system is calculating the Next inspection date from mfg. date automatically, and feeding it automatically in the relevant field in the Batch.
Hence, we need to change u201CNext inspection dateu201D manually for each previous batch if it is revised on the basis of stability, which is practically vary difficult.
Requirement: Retest period shall be revised if changed updated in material master for inspection interval.
AYKDear AYK
From your post it appears that you have Batch Management activated lready and QM functionality you are trying to activate subsequently.
I think you need to make use of Recurring inspection for Batches with Shelf Life Expiry Date (SLED) then only this functionality will work in totality. For this purpose in QM view add Inspection interval period alongwith SLED data
You can use Trigger manually ( T.code QA07) or Job planning ( T.code QA05) for this purpose.
Incase you just want to update next Inspection, you need to do one by one OR make LSMW for same.
Hope this will give you clue
Regards
GIRISH -
Next Backup date 12/30/1899 12:00am error
Hi,
Firstly I'd like to mention that I have found posts with the same question-error, tried everything that was proposed as a solution and still face this situation. I have a windows 2008 server with AD and client PCs all living together on the same domain.
This backup error is present at some client Pcs while others run the backup scheduled flawlessly.
Once again I mention that I have double checked that I have correct Time Zones, correct date and time, both in Windows and BIOS. Have tried to change the scheduled tasks' "configure for" part to windows 7 and so, with no result. And generally everything
else that was proposed at this post, http://answers.microsoft.com/en-us/windows/forum/windows_7-system/next-backup-date-reads-12301899-1200am/62637bf9-7de4-446a-be51-f68e299c9ea1?rtAction=1411015328406 , I have tried to do with no luck. So I am asking for
help on this issue, because it can't be that some PCs of mine work fine and some are not. Thank you in advance for your support.Hi,
It sees that there is something wrong with the schedule task manager, you could refer to the thread below to troubleshoot the issue:
Win 7 Backup and Restore schedule problem
https://social.technet.microsoft.com/Forums/windows/en-US/411a849a-aff3-4fa7-a2b0-5286e13a65a6/win-7-backup-and-restore-schedule-problem?forum=w7itprogeneral
Best Regards,
Mandy
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Next inspection date in the Batch Determination Screen
Hi Gurus,
I am having problems with some user requirements because I am an abaper and I think this needs some SD expertice. Users want to see the "Next inspection date" of the batch (field QNDAT) when they do the batch determination of a delivery (Batch Split --> Batch determination). They want to see a new column in the screen, right next to the "Characteristic sort" field. I think that to put a new column in that standard screen is not possible. So I suggest to change the contents of the existing characteristic sort. And there is where I do not know how to do that. It is possible at all to have the next inspection date as a characteristic of the batch and then use it to sort?
Any help would be really appreciated.
Regards.Hi,
Yes you can use next inspection date as a characteristics and sort the batches based on that.
Inform the user to add this characteristics (LOBM_QNDAT) in the material batch class and batch selection class using transaction code CL02.
Then in SPRO, using transaction code CU71, in the sort rule add this field as characteristics (LOBM_QNDAT).By this way the system will sort the batches based on next inspection date as parameter.
Note that the user needs to fill-in the next inspection date in all the batches in order for the sort rule to work properly.
Regards, -
Hello Forum,
I am working on a requirement of Variable Next inspection date. First time the next inspection time line is after 6 months and 2nd time it should be triggered after 4 months and subsequent one at each month . There is only single field as Inspection interval in the material master. After looking superficially it looks to me that we can realise this through the exit QEVA0003.
But before designing in detail using this exit I would like to understand whether we can achieve this with any other standard SAP functionality -. Bespoke development and exits are the last thing I like to suggest to clients if we have standards SAP way to do the same thing .
Regards
KaushikYou are correct.
The customer exit 'QEVA0003' inputs the next inspection date of batch master.
User can change the next inspection date at transaction MSC2N or MSC5N in SAP standard.
But if you have variable interval for recurring inspection and want to assign next inspection date automatically, you should implement the exit 'QEVA0003'.
Regards
Luke -
Recurring Billing - Next Invoice Date
Hi,
How can I get the "Next Invoice Date" for a recurring billing.
Thank you
Gregory MHi,
Depending on the cycle type will dictate the next invoice date.
So if you had a monthly recurring order starting today on July 27, 2012 the next upcoming date will a month from the date. However the invoice will send 14 days prior to the upcoming date.
For more details please view the article below on how this works exactly.
http://kb.worldsecuresystems.com/239/bc_2391.html#main_How_the_invoicing_works
Kind regards,
-Sidney -
Function in param, start_date & number , return sums next working day
Hi Friends,
I need a funtion which can take in parameters as start_date and number , sum them as new date and return new_start_date as workind day.
Suppose '15-SEP-2009' + 6 should return 23-SEP-2009 as new date.
Basically the sum of date and number should return next working day (excluding saturday,sunday).
e.g '15-SEP-2009' + 6 =21-SEP-2009 , but it includes saturday and sunday , so it should return 23-SEP-2009.
Thanks
NirenHi, Niren,
The first respondent gave a better function for testing for work days (Monday through Friday). If there's a bug with Saturdays, I'm sure that can fixed. Also,that function depends on your NLS settings. If that's an issue for you, that can be fixed, too. The idea that there are 5 work days in any 7 consecutive days will cut down the execution time considerable.
A function like I suggested would be useful if you had to consider holidays as well as weekends.
Here's an untested example:
CREATE OR REPLACE FUNCTION work_days_away
( in_start_date DATE
, in_day_cnt NUMBER
RETURN DATE
DETERMINISTIC
IS
IF in_start_date - TRUNC (in_start_date, 'IW') >= 5
OR is_holiday (in_start_date)
THEN
RETURN work_days_away ( in_start_date + 1
, in_day_cnt
ELSIF in_day_cnt >= 1
THEN
RETURN work_days_away ( in_start_date + 1
, in_day_cnt - 1
ELSE
RETURN in_start_date;
END IF;
END work_days_away;This use the date format 'IW', which does not depend on NLS settings, rather than 'D', which does. -
Getting the next valid date (jump holidays and weekends)
Hello,
I have a column table where I have all holidays of the year in the format "yyyymmdd,yyyymmdd,...", for example, "20091012,20091225".
I'd like to do a query where I pass a date and a increment of days and it returns the next valid date, excluding weekends and the holidays that I have in the column holidays that I show above.
P.S: Instead of pass a date and a increment of days, I could pass just a already incremented date, and this query just validate this date, adding 2 days for each weekend and one day for each holiday.
Is there a way to do that?
ThanksHi,
Ranieri wrote:
Hello,
I have a column table where I have all holidays of the year in the format "yyyymmdd,yyyymmdd,...", for example, "20091012,20091225".Dates should always be stored in DATE columns. If you really want to, your can also store the formatted date in a separate column.
I'd like to do a query where I pass a date and a increment of days and it returns the next valid date, excluding weekends and the holidays that I have in the column holidays that I show above.For convenience, you can't beat a user-defined function, such as Etbin's.
If you really want a pure SQL solution, you can
(a) generate a list of all the days that might be between the start date and end date (sub-query all_days below)
(b) outer join that to your holiday table (sub-query got_dnum, below)
(c) rule out the holidays and weekends (sub_query got_dnum, WHERE clause)
(d) return the nth remaining day (main query below)
WITH all_days AS
SELECT TO_DATE (:start_date, 'DD-Mon-YYYY') + LEVEL AS dt
FROM dual
CONNECT BY LEVEL <= 3 -- 3 = max. consecutive non-work days
+ (:day_cnt * 7 / 4) -- 4 = min. work days per week
, got_dnum AS
SELECT a.dt
, ROW_NUMBER () OVER (ORDER BY a.dt) AS dnum
FROM all_days a
LEFT OUTER JOIN holidays h ON a.dt = TO_DATE (txt, 'YYYYMMDD')
WHERE h.txt IS NULL
AND TO_CHAR (a.dt, 'Dy') NOT IN ('Sat', 'Sun')
SELECT dt
FROM got_dnum
WHERE dnum = :day_cnt
;This assumes :day_cnt > 0.
The tricky part is estimating how far you might have to go in sub-query all-days to be certain you've included at leas :day_cnt work days.
Where I work, holidays are always at least 7 days apart.
That means that there can be, at most, 3 consective days without work (which happens when there is a holiday on Monday or Friday), and that thee are at least 4 work days in any period of 7 consecutive days. That's where the "magic numbers" 3 and 4 come from in the CONNECT BY clause of all_days. Depending on your holidays, you may need to change those numbers.
P.S: Instead of pass a date and a increment of days, I could pass just a already incremented date, and this query just validate this date, adding 2 days for each weekend and one day for each holiday.Good thought, but it won't quite work. How do you know how many holidays were in the interval? And what if the first step produces a Saturday before a Monday holioday?
You might be interested in [this thread|http://forums.oracle.com/forums/message.jspa?messageID=3350877#3350877]. Among other things, it includes a function for determining if a given date (in any year) is a holiday, without reference to a table.
Maybe you are looking for
-
I do not see this: Please hover the mouse (cursor) over the snapshot, and you'll find there are 4 icons on the top. The icons are there for : open in newtab, edit, refresh and remove.
-
I cannot turn my wifi on. The button is greyed out. This problem started after I update my software. First tech I spoke to said it was my problem because I chose to update the software and since I was out of warrenty, I would have to pay $19.99 fo
-
Any simple "task based" SPS examples?
Hi all, I'm trying to learn more about SPS, and have a MS and RA installed, talking over ssh: all seems fine so far. Going through the docs, I'm slogging through plans, made up of components, which run procedures etc... lots of terminology to learn u
-
I am having a little trouble with a JEditorPane in my application. The JEditorPane is the main conversation area in an IM system. The idea is that when someone sends a message to you, the text is appended to this editor pane, and it scrolls to the bo
-
:Offset specification "+4" is greater than or equal to field length ("4")
hi all, when i writing routine for Date field(len 8) in transfer rules, im getting below error <b>:Offset specification "+4" is greater than or equal to field length ("4")</b> the same routine in another old dev server , there were no syntax errors.