Reputation: 423
I've such select in datepicker source:
select DATA_WYPOZYCZENIA from rezerwacje WHERE ID_REZERWACJI=:P110302_ID_REZ
After loading page item loads value with mask DD-MON-YYYY HH24:MI but mask set in datepicker settings is DD-MON-YYYY. The result I want to get is to have date loaded from select i've written above int datepicker in format DD-MON-YYYY. Changing settings of mask attribute in intem setting do not change aything.
Upvotes: 0
Views: 1231
Reputation: 17920
DATE
is a RAW
datatype. When we attempt to print it, there has to be some format. But NOT Every SQL doesn't have that format specified.
For this reason, the DBMS
has some default date format in their set up, which is local to the db session. Oracle names these default parameters as NLS_PARAMETERS. And NLS_DATE_FORMAT is the one that specifies the date format.
SELECT
to_char(DATA_WYPOZYCZENIA,'dd-MON-YYYY') as DATA_WYPOZYCZENIA
FROM
rezerwacje
WHERE
ID_REZERWACJI=:P110302_ID_REZ
But when your client receives this query, the mapping could no more be Date datatype but String. Because, now we converted the date into a String with some format.
Upvotes: 1