Connecting Tech Pros Worldwide Forums | Help | Site Map

DATETIME in Forms 6

uthra
Guest
 
Posts: n/a
#1: Jul 19 '05
Hi,
We are having forms 6 and i having a form which has the column as
datetime. I need to have it as datetime for the user to put the time
etc. And i have the format mask as MM/DD/RRRR HH:MI:SS AM. If the
user puts the mm/dd/rrrr and leaves the field without putting the hour
& minutes the default time 12:00AM gets registered. We don't want
this to happen as it gives the incorrect report. Please let me know
what is the format mask i should use in order to correct this problem.
I also tried HH24:MI:SS. But this way the user can't choose AM/PM
instead they have to put 21 for 9PM. Please advise.

Thanks in advance

stefano biotto
Guest
 
Posts: n/a
#2: Jul 19 '05

re: DATETIME in Forms 6


shankaruthra@yahoo.com (uthra) wrote in message news:<c6fa8591.0310080821.4027dfdc@posting.google. com>...[color=blue]
> Hi,
> We are having forms 6 and i having a form which has the column as
> datetime. I need to have it as datetime for the user to put the time
> etc. And i have the format mask as MM/DD/RRRR HH:MI:SS AM. If the
> user puts the mm/dd/rrrr and leaves the field without putting the hour
> & minutes the default time 12:00AM gets registered. We don't want
> this to happen as it gives the incorrect report. Please let me know
> what is the format mask i should use in order to correct this problem.
> I also tried HH24:MI:SS. But this way the user can't choose AM/PM
> instead they have to put 21 for 9PM. Please advise.
>
> Thanks in advance[/color]

You could fill the the mm/dd/rrrr that the user puts in
the item MY_BLOCK.date
using the trigger:
WHEN-VALIDATE-ITEM of MY_BLOCK.date
declare
now date;
txt_time varchar2(20);
begin
select sysdate into now;
txt_time:=to_char(now,'HH:MI:SS AM');
MY_BLOCK.date:=to_date(to_char(MY_BLOCK.date,'mm/dd/rrrr')||' '||
txt_time,'MM/DD/RRRR HH:MI:SS AM');
end;
sybrandb@yahoo.com
Guest
 
Posts: n/a
#3: Jul 19 '05

re: DATETIME in Forms 6


shankaruthra@yahoo.com (uthra) wrote in message news:<c6fa8591.0310080821.4027dfdc@posting.google. com>...[color=blue]
> Hi,
> We are having forms 6 and i having a form which has the column as
> datetime. I need to have it as datetime for the user to put the time
> etc. And i have the format mask as MM/DD/RRRR HH:MI:SS AM. If the
> user puts the mm/dd/rrrr and leaves the field without putting the hour
> & minutes the default time 12:00AM gets registered. We don't want
> this to happen as it gives the incorrect report. Please let me know
> what is the format mask i should use in order to correct this problem.
> I also tried HH24:MI:SS. But this way the user can't choose AM/PM
> instead they have to put 21 for 9PM. Please advise.
>
> Thanks in advance[/color]

Apparently your users don't WANT to enter the time. THAT can't be
resolved by changing format masks.

Sybrand Bakker
Senior Oracle DBA
Mark D Powell
Guest
 
Posts: n/a
#4: Jul 19 '05

re: DATETIME in Forms 6


shankaruthra@yahoo.com (uthra) wrote in message news:<c6fa8591.0310080821.4027dfdc@posting.google. com>...[color=blue]
> Hi,
> We are having forms 6 and i having a form which has the column as
> datetime. I need to have it as datetime for the user to put the time
> etc. And i have the format mask as MM/DD/RRRR HH:MI:SS AM. If the
> user puts the mm/dd/rrrr and leaves the field without putting the hour
> & minutes the default time 12:00AM gets registered. We don't want
> this to happen as it gives the incorrect report. Please let me know
> what is the format mask i should use in order to correct this problem.
> I also tried HH24:MI:SS. But this way the user can't choose AM/PM
> instead they have to put 21 for 9PM. Please advise.
>
> Thanks in advance[/color]

Just code an edit into the form logic and validate that the user
provides the time. Depending on your circumstances you may also be
able to default the field value to sysdate and just have the user
overtype it when the value is different.

HTH -- Mark D Powell --
Closed Thread


Similar Oracle Database bytes