Hi Everyone,I am building a portlet that show me the time sheet lines between two specific dates.
The query works correctly without the dates condition: When the condition is active, the query show an error.
The condition is following:
WHEREKTMG_PERIODS.START_DATE between to_date('[VP.START_DATE]', 'yyyy-mm-dd hh24:mi:ss') AND to_date('[VP.END_DATE]', 'yyyy-mm-dd hh24:mi:ss')
Why this condition is not working correctly??? Somebody has idea about the problem???
Thanks in advance.
Go to Solution.
Could you please try without hours definitions and define date format for what is your ragional definitions. Please be careful to notaions: "." or "/" or "-"
For example I'm using this code:
KTMG_PERIODS.START_DATE between to_date('[VP.START_DATE]', 'dd.mm.yyyy')
is it work for you? please inform us.
PS: Please keep alive our forum via kudos the professionals
I checked the regional settings and the short date format is 21/12/1.
So, I modified the query as follow:
AND KTMG_PERIODS.START_DATE between to_date('[VP.START_DATE]', 'dd/mm/yy') AND to_date('31/12/11', 'dd/mm/yy')
and the result is a portlet error:
AND KTMG_PERIODS.START_DATE between to_date('2011-11-30 00:00:00', 'dd/mm/yy') AND to_date('31/12/11', 'dd/mm/yy') <br> AND ROWNUM <= 200
It appears like the token don't allow take an specific date format.
Do you have any idea about the problem???
You are right. THe portlet is working correctly.