Troubleshooting
Problem
The week number output of the date() and strdate() date conversion functions is incorrect
Symptom
Gentran:Server for UNIX; 6.X
AIX
Application Integration Map
The week number output of the date() and strdate() date conversion functions is incorrect.
%W value comes out one week off. In this example, the incorrect output below should be 20100816 (monday the 16th instead of monday the 23rd).
Incorrect output:
E2EDP16001 03DW20100823
Extended rule:
if $4240_SCC.#4017 = "4" then
begin
if #2379:13 = "102" then
begin
$TEMP_FST[lin_cnt][fst_cnt].#DTM_2380 = date("%Y%m%d",#2380:13);
$TEMP_FST[lin_cnt][fst_cnt].#SCC_2013 = "D";
end
if #2379:13 = "616" then
begin
$TEMP_FST[lin_cnt][fst_cnt].#DTM_2380 = date("%Y%W",#2380:13);
$TEMP_FST[lin_cnt][fst_cnt].#SCC_2013 = "W";
end
end
Log InLog in to view more of this document
Historical Number
NFX9904
Was this topic helpful?
Document Information
Modified date:
11 February 2020
UID
swg21558552