LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Convert a text field to a date

On Tue, 11 Mar 2008 18:59:47 +0000, dslocum
wrote:

Is there a more efficient way to do this? Ron, when I used your
formulas I got #value and #Num errors.


If you got those errors, then the values you are seeing in A1 and B1 are not
the same as what is there.

For example, if

A1: 2008
B1: 828

Then the formula

=DATE(A1,INT(B1/100),MOD(B1/100,1)*100) will give the date of 8/28/2008 (if
properly formatted) and not an error.

We could spend a lot of time trying to figure out what is really in there.
Commonly there is a <nbsp which could be stripped off.

Or we could apply a formula to be sure we pick out the numbers only.

I would just go with what you have that works.

"Perfect is the enemy of good enough"
--ron
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert date field to month in Pivot table MESTRELLA29 Excel Discussion (Misc queries) 9 May 23rd 07 02:50 PM
Convert arial text field to barcode bob engler Excel Worksheet Functions 1 July 7th 06 08:29 AM
Changing a text field to a date field juliet New Users to Excel 4 February 21st 06 09:52 PM
How to convert date field to number value landj68 New Users to Excel 3 October 11th 05 04:48 PM
Convert 20050118 to a working date field Jessica Excel Worksheet Functions 7 February 23rd 05 10:07 PM


All times are GMT +1. The time now is 03:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"