I am in need of converting the following pl/sql to mysql, and thought this community might be able to help. Having
a heck of time emulating in MySql. It is the subtraction/addition of the interval statement with the julian part that
I cannot figure out. I will also, post in some MySql areas, and any insight appreciated.
trunc(to_number(to_char(sysdate,'j'))/7) - trunc(to_number(to_char(trunc(sysdate,'yy') - interval '3' month, 'j' ))/7) + 1 as sysdate_fiscal_week_offset1,
trunc(to_number(to_char(sysdate,'j'))/7) - trunc(to_number(to_char(trunc(sysdate,'yy') + interval '9' month, 'j' ))/7) + 1 as sysdate_fiscal_week_offset2
Thanks,
Bob