sysdate and format maks...
385806Apr 10 2003 — edited Apr 15 2003Hello everyone,
I have a problem which really needs an answer.
It's concerning the usage of sysdate in Forms.
Before the start of my very first form I set a Pre-Form trigger.
In that trigger I put:
SET_APPLICATION_PROPERTY(PLSQL_DATE_FORMAT,'DD-MM-YYYY');
Here is my problem. I want to use the sysdate for two reasons.
The first is to get a date notation as DD-MM-YYYY such as 19-04-2003.
But in the second place I what to use it for the creation of
a date like: DD-MM-YYYY 12HH:MI:SS AM such as 19-04-2003 08:20:37 AM.
I want to have the second option so since I have little
experience with date usage in Forms my next step was this:
Take sysdate, put a format mask over it:
to_date(sysdate, 'DD-MM-YYYY 12HH:MI:SS AM')
and the date would be in the format 19-04-2003 08:20:37 AM.
but I whas wrong.... the output date is still only 19-04-2003.
the format mask whas totally ignored by forms.
So my next try whas to change the code in the pre-form trigger to:
SET_APPLICATION_PROPERTY(PLSQL_DATE_FORMAT,'DD-MM-YYYY 12HH:MI:SS AM');
And then when i just needed a date with the format DD-MM-YYYY to put a mask
over this in the form of: to_date(sysdate, 'DD-MM-YYYY').
But that didn't work also. it returned a lot of zero's at the end of the yyyy.
and forms reported an error.
The date's are put in database fields in a datablock on the form.
So I'm pretty sure that I have to use the to_date function, because the
database fields are of type DATE.
Does anyone know how to help me?
So I what to use sysdate (for the server date) and in two ways:
one with format DD-MM-YYYY and the other in the format of
DD-MM-YYYY 12HH:MI:SS AM.
Maybe I'm looking at it from a to difficult position.
Maybe it is very simple to do this.
greetings,
Mark