473,473 Members | 4,176 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 5727
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...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.