473,405 Members | 2,185 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,405 software developers and data experts.

Need a field that is Formatted. to store the Time

I am creating a remiander application. I want the user to enter the
time in the box(can be a textbox).
____________
the format should be | 05:37:15 |
-----------------------

that should be similar to text field. The format is same as the Date
& Time Properties Field of the Windows.

the colons ( : : ) should be present by default and the user cannot
remove them

Jun 24 '07 #1
4 1087
It looks like you want to use the TimeSpan class.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"sravan_reddy001" <sr*************@gmail.comwrote in message
news:11**********************@z28g2000prd.googlegr oups.com...
>I am creating a remiander application. I want the user to enter the
time in the box(can be a textbox).
____________
the format should be | 05:37:15 |
-----------------------

that should be similar to text field. The format is same as the Date
& Time Properties Field of the Windows.

the colons ( : : ) should be present by default and the user cannot
remove them
Jun 24 '07 #2
What is that class about. I want a control to read the time as input
in the above format. It is Possible??

Jun 24 '07 #3
You can use KeyUp event. Accept only numeric input and insert colons at
appropriate places. Hope it helps.

SG
"sravan_reddy001" <sr*************@gmail.comwrote in message
news:11**********************@z28g2000prd.googlegr oups.com...
>I am creating a remiander application. I want the user to enter the
time in the box(can be a textbox).
____________
the format should be | 05:37:15 |
-----------------------

that should be similar to text field. The format is same as the Date
& Time Properties Field of the Windows.

the colons ( : : ) should be present by default and the user cannot
remove them

Jun 24 '07 #4
thanks.
thats good idea. i got it .
i used the maskedtextbox control, there i had given my custom
formatting.

Jun 25 '07 #5

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

Similar topics

2
by: Mike Button | last post by:
Hello all, I am really really desperate on what I should do, and I am asking for help from anyone in this newsgroup, here's the situation: I am creating a form that is being run on a server...
2
by: JP SIngh | last post by:
Can someone please suggest the correct way to store the date & time in SQL Server? I want to store the date and time a record was created. What should the field type be in SQL Server? How can...
5
by: MARK | last post by:
Hi, I have a printer consumables database. I have a form designed to change the status of consumables ie. in use, dead, stock etc. I select one of my consumables records from the combo box...
1
by: Dave | last post by:
Greetings, I am trying to create a duration field in a query. I have a field with a start time and a field with an end time. They are both in military time, and are formatted as hours:minutes. I...
3
by: Dustin Wilson | last post by:
I have a problem with the following line of code. rstOutput! = FormatDateTime("January 1, 2004", vbLongDate) When I run this on my computer at home it runs without problem but when I run it at...
1
by: strauss.sean | last post by:
To all: Hi! I am trying to use an append queries on a table where the key field is numeric, formatted as 00-00-000. The query collects the information corectly, and there are no records...
11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
3
by: Solution Seeker | last post by:
I want to Store the String value with Single Quotes in the Field of Database where if i try to Store the String value with Single Quotes (as it is) then it is throwing the error as SQL String...
1
by: news.microsoft.com | last post by:
I have a form field that accepts a start time and one that accepts an end time. I am using a masked editor that allows the user to enter the hour and minutes and am and pm. When I save the form...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.