Hello. Please help as this is urgent. I have a DB2 table where I need to get the current month and year from table X. gl_date is defined as date and is 10 bytes. Here is the query I used. It works if I use the month or the year but not both. Thank you.
select * from table x where month(gl_date) = month(current date) and year(gl_date) = year(current date);
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.