35 pts.
0
Q:
AS400 QUERY-Beginning of year date
How can I create a date field with the 1st day of the current year ie: 01/01/2009 using WRKQRY. Thanks!
ASKED: Apr 6 2009  5:57 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
35 pts.
0
A:
 RATE THIS ANSWER
+1
Click to Vote:
  •   1
  •  0
  • AddThis Social Bookmark Button

Thanks! It worked perfectly!

Hi,

This should work for you. You may have to change the substring position depending on your date format :-


Field Expression Column Heading Len Dec
YEARSTART '01/01/' || SUBSTR(
CHAR(CURRENT(DATE)), 1, 2)



Regards,

Martin Gilbert.
Last Answered: Apr 7 2009  3:08 PM GMT by TB2G   35 pts.
Latest Contributors: Gilly400   23625 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0