converting text value date
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and Help » Converting Text Value to a Date

Converting Text Value to a Date

The UK's most regular instructor-led training courses.
Training information: visual+basic+for+excel+courses+london · Excel training courses · VBA courses London UK

resolvedResolved · Urgent Priority · Version 2003

Converting Text Value to a Date

David has attended:
Access Advanced course

by - delegate David [6 posts] (2008 Jul 3 Thu, 12:00) replyReply

Hi
I have a user input form made through vb which allows users to enter data in the form and then click a button and the data populates into the worksheet. This works fine except there is a text box field for a date. When the data is populated the date format comes out as mm/dd/yyyy in the worksheet. So when a user enter 10/01/1985 in the text box field it populates into the worksheets as 01/10/1985. Is there a way of changing the format so that it populates in the uk date format dd/mm/yyyy?

Excel VBA 2 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2007 2008 Nov 25 Tue + 26 Wed Bayswater 6 book now £455 £515
2003 2008 Nov 26 Wed + 27 Thu Bloomsbury 2 book now £495 £495
2003 2008 Dec 1 Mon + 2 Tue Bloomsbury 2 book now £495 £495
2003 2008 Dec 4 Thu + 5 Fri Bloomsbury 5 book now £450 £485
2007 2008 Dec 11 Thu + 12 Fri Bayswater 5 book now £475 £515
2007 2009 Jan 8 Thu + 9 Fri Bloomsbury 6 book now £450 £475
Full Schedule: See all 37 Excel VBA course dates.
Bookings currently available until 26th November 2009.

RE: Converting Text Value to a Date

by - trainer Stephen gold contributer[369 posts] (2008 Jul 4 Fri, 09:23) replyReply

Hi David

Thankyou for your question

My first impression is that the format of the cells into which the date value is being entered is causing the problem.

If you select the cells in question and click on Format-Cells-Number you will see the date format options.

You should first ensure that the location is set to English(UK), not English(US) and then choose the specific format that you need.

If this doesn't solve the problem, please let me know so we can explore other options

Regards

Stephen

RE: Converting Text Value to a Date

by - delegate David [6 posts] (2008 Jul 4 Fri, 09:39) replyReply

Thanks for the quick response Stephen. I have just tried this and it is still being populated in the format mm/dd/yyyy. I wonder whether in the vb code we have to specify the format?

RE: Converting Text Value to a Date

by - trainer Stephen gold contributer[369 posts] (2008 Jul 4 Fri, 14:32) replyReply

Hi David

I have just tried to replicate your problem using the method you describe, and my dates come out in the correct format.

There are a number of VB expressions that allow dates to be formatted in a particular way, but it is difficult give you precise advice without seeing the problem first hand.

Is it possible for you to email me a copy of the workbook? My email address is stephenATmicrosofttraining.net

Regards

Stephen


Related articles

· Training Budgets In A Bad Economy
· Basic Excel Training
· Microsoft Excel Training: Essential for Today's Employees
· Customized Financial Excel Courses in London
· Crazy Things People Have Done With Excel

Please browse our web site to find out more about
visual+basic+for+excel+courses+london and other Microsoft training courses.

Excel tip:

Counting Non Number Cells (Text)

If you try to use the COUNT FUNCTION =COUNT(Cell range)with a range of cells with numbers and or containing text fields you wil find that that the text cells will be excluded from the the count. If you want to include them try the the COUNTA FUNCTION =COUNTA(Cell range). This counts both text and number cell values.

View all Excel hints and tips

Rate this page:
3.5/5 (2 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz