473,395 Members | 1,460 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,395 software developers and data experts.

Time format MaskEdBox

I am trying to create a mask for a time value typically of 02:23.45 and
while I can get the mask to show in the box when it loses focus it rounds
the number in some way to 02:24.
I want to put this value into an mdb database and that is being equally
intransigent and cussed. the database can change in any way required to
store the value as long as it can be retrieved and displayed.
I am getting close to believing I might have to write some funky
concatenation function thing to break ordinary text input up and format it
properly to enter it into the database...
Any suggestions gratefully received..
Ricahrd Dutton
Jul 17 '05 #1
1 7055
> I am trying to create a mask for a time value typically of 02:23.45 and
while I can get the mask to show in the box when it loses focus it rounds
the number in some way to 02:24.
I want to put this value into an mdb database and that is being equally
intransigent and cussed. the database can change in any way required to
store the value as long as it can be retrieved and displayed.
I am getting close to believing I might have to write some funky
concatenation function thing to break ordinary text input up and format it
properly to enter it into the database...
Any suggestions gratefully received..


Instead of using a Masked Edit control, why not use a DatePicker control
(DTPicker) set to receive time. Go to VB's menu bar, click on
Project/Components and select Microsoft Windows Common Controls-2 from the
list. Put a DTPicker control on the form and change its Format property to
2-dtpTime. The user can arrow left and right between the time fields (or
click on them) to select the hours, minutes and seconds. Then the user can
type in a number, use the up/down arrow keys on the keyboard or the arrows
on the control itself to change the value in the field. You can set an
initial time via the Value property and you would retrieve the time from the
user via that same property. You should be able to assign that value you get
from the Value property directly to the database, I would think.

Rick - MVP
Jul 17 '05 #2

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

Similar topics

4
by: Gord | last post by:
Hello, VB6 accepts Date and Time values as 'Date'. I'm trying to verify entry into a database I'm creating by verifying that an appropriate Date or Time value has been entered. Using built-in...
2
by: Hmmm... | last post by:
Is there a way to control which controls appear to be "on top". For example a MaskEdBox shows up "on top" of a ComboBox when the 2 controls overlap, but a MaskedBox shows up "underneath" a...
8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
3
by: T-Narg | last post by:
I would like to produce the following output based on my XML file: My Album (2005) Elapsed Time (hh:mm:ss): 00:07:00 Song 1: title1 Length (hh:mm:ss): 00:02:30 Song 2: title2 Length...
6
by: Rene | last post by:
I am currently displaying the time of day value using the "h:mm:ss tt" format (hr=hours, mm=minutes, ss=seconds tt=AM/PM). I was looking under the "Regional and Language Options" and it looks...
7
by: Edward Mitchell | last post by:
I have a number of DateTimePicker controls, some set to dates, some set to a format of Time. The controls are all embedded in dialogs. I created the controls by dragging the DateTime picker from...
10
by: scorpion53061 | last post by:
What I thought would be pretty easy has turned out not to be. I have three variables. Actiontime is formatted as 08/11/2004 11:03PM Actiontime JobStreamStart (11:00:00PM) JobStreamEnd...
18
by: Dirk Hagemann | last post by:
Hello, From a zone-file of a Microsoft Active Directory integrated DNS server I get the date/time of the dynamic update entries in a format, which is as far as I know the hours since january 1st...
2
by: nospam | last post by:
I have some data that I need to run date diffs on. The catch is that for some of this data, there is a date value in one of the fields, with no time. It might look like this: ROW DT1 ...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.