FIRTS QUESTION
how can i print a date with hours minutes and seconds in a pl sql stored procedure in oracle, because i have a column in my table and it's type is DATE, when i do a select for this column I get the entire date with minutes hours and seconds,
but when i try to print that date in a stored procedure using this
DBMS_OUTPUT.PUT_LINE('date value before my if : '|| to_date(my_date, 'DD-MM-YYYY HH24:MI:SS'));
that prints me only the date without the hours minutes and seconds. i'm getting that my_date from a select into like this
select
to_date(ni.my_date, 'DD-MM-YYYY HH24:MI:SS') , ni.id_ni into my_date_iterator, id_iterator
from
i'm doing this print inside a loop but i dont think that that have something to do.
why when i do a normal slect it brings me the hours, minutes and seconds, but when i do a select into inside a stored procedure it dont print me the seconds and minutes and hours, i think that when i do the select into my date variable it brings me the entire date with seconds and minutes but i dont know why it dont print them
SECOND QUESTION
how can I compare two dates that have the same day, month and year.. but they have diferent hours, minutes and seconds
I have this stroe procedure but when i compare the dates it says they are the same:
when i run that stored it says that the dates are equals and it not says that the bigger date is bigger