Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Formatting variables in VB.NET

Posted on 2009-04-01
1
Medium Priority
?
216 Views
Last Modified: 2012-05-06
formatting a textbox in VB

I need to format a textbox using Visual Studio, and VB.Net.

It needs to be formatted so that dates can be entered, for example, I was thinking this may work:

If textbox1.text <> dd/mm/yyyy Then Me.Close

... but it doesn't

-Will
0
Comment
Question by:r0yyyy
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 24038714
Its more like validation than formatting. If date is what your are looking to validate then use the datetimepicker control instead of textbox. Otherwise, there are many options such as regular expressions, masked textbox, parsing etc.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question