473,385 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

DATETIME in Forms 6

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
Jul 19 '05 #1
3 11461
sh**********@yahoo.com (uthra) wrote in message news:<c6**************************@posting.google. com>...
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


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;
Jul 19 '05 #2
sh**********@yahoo.com (uthra) wrote in message news:<c6**************************@posting.google. com>...
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


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

Sybrand Bakker
Senior Oracle DBA
Jul 19 '05 #3
sh**********@yahoo.com (uthra) wrote in message news:<c6**************************@posting.google. com>...
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


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 --
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Picho | last post by:
Hi all, Does anyone know of a GOOD explaination why the DateTime type is a value time (cannot be null) and furthermore does not provide a DateTime.Empty value? when using a DateTimePicker...
15
by: Dan S | last post by:
My application asks the user to enter in a date - in the mm/dd/yyyy format. Is there any quick and easy way to verify the date the user enters is formatted correctly? Right now I'm calling...
3
by: sunny076 | last post by:
Hi, I am trying to convert from Julian to Gregorian data in C#. I was exploring teh JulianCalendar and Gregorian calendar classes but still not sure how I can do it. For example, the Julian date...
3
by: nbohana | last post by:
I am using C#, Windows forms and SQL Server. Part of the data that I am having problems with is defined as datetime. When I insert the field into the datebase it is formated as "MM/dd/yyyy", and...
4
by: Lucvdv | last post by:
I have to connect to a server set up by the government, where they used Apache Axis to create a webservice. The code I use to interface to the webservice is generated by wsdl.exe, based on a...
11
by: Rubic | last post by:
I was a little surprised to recently discover that datetime has no method to input a string value. PEP 321 appears does not convey much information, but a timbot post from a couple years ago...
14
by: Me | last post by:
Hi all I am getting a really bizzare error on when I convert a string into a datetime: The code is : DateTime dt1 = Convert.ToDateTime("10 Sep 2005"); Console.WriteLine(dt1.Year);
3
by: Sugandh Jain | last post by:
Hi, I am using property like this.. private DateTime? _propName; public DateTime? PropName { get { return _propName; }
2
by: Luc The Perverse | last post by:
I was trying to make a quick 5 minute app to remind me to do something before leaving work - just have the dialog appear which showed in the quicklaunch bar. The application hung (which was...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.