Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / December 2006

Tip: Looking for answers? Try searching our database.

maskedtextbox retreive data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Owen - 12 Dec 2006 09:12 GMT
Hello:

I have to show a time in a control, I new in v.s. 2005 and I think use the
maskedtextbox, I put the mas in the time normaly, but I like to change de
mask to show exactly the time in 12 hours, like: 2:34 pm and this format
must be validate. but this problem is not the main, the core is in the
moment that I need the new data write in the maskedtextbox, how I get in
datetime type.

I hope somebody help me with this.

Best regards,
Owen.
Jeff Gaines - 12 Dec 2006 10:41 GMT
>Hello:
>
[quoted text clipped - 4 lines]
>moment that I need the new data write in the maskedtextbox, how I get in
>datetime type.

Are you setting the time programmatically (e.g.  using a timer event) or
are you seeking input from a user?

Signature

Jeff Gaines
Damerham Hampshire UK

Owen - 12 Dec 2006 10:50 GMT
I just set the time programmatically, and the user can change with key, and
i want to get this value, in datetime normaly

best regards,
owen.

> On 12/12/2006 in message <uCZwM3cHHHA.1248@TK2MSFTNGP02.phx.gbl> Owen
> wrote:
[quoted text clipped - 10 lines]
> Are you setting the time programmatically (e.g.  using a timer event) or
> are you seeking input from a user?
Jeff Gaines - 12 Dec 2006 11:44 GMT
>I just set the time programmatically, and the user can change with key,
>and i want to get this value, in datetime normaly

OK, how about:

string strTime = "01/01/2007 " + maskedTextBox1.Text;
DateTime daTime = Convert.ToDateTime(strTime);

You would need to set the day, month and year.

Signature

Jeff Gaines
Damerham Hampshire UK


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.