SatanClaus
Programmer
Hello and good morning all together!
We are running an oracle 10g DB with Application Express (APEX, formerly HTMLdb).
I'm trying to create a little PL/SQL block that writes a sequence of dates into a table.
In this PL/SQL block i have an user variable 18_TERMVON
the input for this variable looks like this:
26/09/2006 10:41
In the beginning i declare a new variable TERMSTART:
(i have to convert it to_date, because there is a loop where i add TERMSTART + 1 [day] every round until ... doesn't matter)
The result i get is:
26/09/0006 10:41
but i need
26/09/2006 10:41
Can you tell me what goes wrong here?
When i Change the code to
i get
26/09/2006 10:41
But this doesn't help me because i need the addition of one day after each cycle.
Hope i could express myself, so you can understand me.
Thanks in advance for your help.
Greetings from Germany,
SatanClaus
We are running an oracle 10g DB with Application Express (APEX, formerly HTMLdb).
I'm trying to create a little PL/SQL block that writes a sequence of dates into a table.
In this PL/SQL block i have an user variable 18_TERMVON
the input for this variable looks like this:
26/09/2006 10:41
In the beginning i declare a new variable TERMSTART:
(i have to convert it to_date, because there is a loop where i add TERMSTART + 1 [day] every round until ... doesn't matter)
Code:
DECLARE
TERMSTART date := TO_DATE(:P18_TERMVON, 'DD/MM/YYYY HH24:MI');
[...]
Select
(to_date(substr(TERMSTART,1,10)|| ' ' ||substr(:P18_TERMVON,12,5), 'DD/MM/YYYY HH24:MI'),
[...]
The result i get is:
26/09/0006 10:41
but i need
26/09/2006 10:41
Can you tell me what goes wrong here?
When i Change the code to
Code:
Select
(to_date(substr(:P18_TERMVON,1,10)|| ' ' ||substr(:P18_TERMVON,12,5), 'DD/MM/YYYY HH24:MI'),
[...]
i get
26/09/2006 10:41
But this doesn't help me because i need the addition of one day after each cycle.
Hope i could express myself, so you can understand me.
Thanks in advance for your help.
Greetings from Germany,
SatanClaus