473,221 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,221 software developers and data experts.

time edit box


Is there a simple time only edit box available. I have a datetime on
the database but I only want to set the hours and minutes. Any
suggestions?
Aug 15 '08 #1
4 5717
On Thu, 14 Aug 2008 22:09:17 -0700, Ken Foskey
<rm**********@optushome.com.auwrote:
Is there a simple time only edit box available. I have a datetime on
the database but I only want to set the hours and minutes. Any
suggestions?
You could use a couple of NumericUpDown controls, one for hours and one
for minutes. Put a Label with a colon in between them. :)
Aug 15 '08 #2
On Aug 15, 9:16*am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Thu, 14 Aug 2008 22:09:17 -0700, Ken Foskey *

<rmove.fos...@optushome.com.auwrote:
Is there a simple time only edit box available. * I have a datetime on
the database but I only want to set the hours and minutes. *Any
suggestions?

You could use a couple of NumericUpDown controls, one for hours and one *
for minutes. *Put a Label with a colon in between them. *:)
Alternatively, a MaskedTextBox with a mask of "90:00" could be used.

The problem is localization. A colon symbol in the mask will be
automatically changed to the proper time delimiter for the current
locale, but there's also the AM/PM issue.

Aug 15 '08 #3

"Ken Foskey" wrote:
>
Is there a simple time only edit box available. I have a datetime on
the database but I only want to set the hours and minutes. Any
suggestions?
Hi Ken,

Use a DateTimePicker. Set it's Format to Custom and use the CustomFormat
"HH:mm" (HH for 24 hours or hh for 12). Set ShowUpDown to true to hide the
calendar dropdown and switch to NumericUpDown mode.

--
Happy Coding!
Morten Wennevik [C# MVP]

Aug 15 '08 #4
On Thu, 14 Aug 2008 23:52:01 -0700, Morten Wennevik [C# MVP] wrote:
Use a DateTimePicker. Set it's Format to Custom and use the
CustomFormat "HH:mm" (HH for 24 hours or hh for 12). Set ShowUpDown to
true to hide the calendar dropdown and switch to NumericUpDown mode.

Thanks...
Aug 15 '08 #5

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

Similar topics

13
by: perplexed | last post by:
How do you convert a user inputted date to a unix timestamp before insterting it into your database? I have a form, with a textfield for a date that the user inputs in the format mm-dd-yyyy and...
9
by: Kelly Vernon | last post by:
I have a standard ASP page that appends to an xml page. Currently if there is more than one person attempting to append to the same XML file at a time. One user will have the ability to append,...
2
by: William Gill | last post by:
I need to display a couple of labels and a checkbox from each entry in my database. Simple enough, but there are several hundred records, and I only want to display 5 or 10 at a time. Can this be...
1
by: cyshao | last post by:
How to set DateTimePicker only edit time ? There is a DateTimePicker whoes Format = Time. I find it only displys as time edit, but in fact, this control still control Full DateTime when you...
1
by: ad | last post by:
I use DataGrid in my web application for editing data. But the DataGrid can edit one row at a time. How can I let the user edit multiple rows at a time?
0
by: arunpandey | last post by:
Friends I am creating columns and edit button in ASP.NET DataGrid at Run Time but when I click on the Edit Button disappears all columns and edit button itself. Only one column remains stay back,...
3
by: arunpandey | last post by:
Friends I am creating columns and edit button in ASP.NET DataGrid at Run Time but when I click on the Edit Button disappears all columns and edit button itself. Only one column remains stay back,...
0
by: da | last post by:
With ASP 1.1, when creating an input/edit form for data, I'd use one form, validate the fields, and then via a flag of some sort would either UPDATE or INSERT the data. With ASP 2.0 we're...
1
by: javediq143 | last post by:
Hi All, This is my first post in this forum. I'm developing a CMS for my latest website. This CMS is also in PhP & MySQL. I'm done with the ADD section where the Admin can INSERT new records in...
12
by: AccessBeetle | last post by:
I have a qry bound form showing the search results based on the user entered criteria. There is a button called Edit on that form. The form is locked initally to stop user to edit any record...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.