A database query program outputs everything as a text string. One of
the fields is a date, formatted as yyyymmdd. Is there a worksheet
function that will change this to an Excel-recognized date? Or a
macro? The error checking doesn't flag this.
Ed
Pete_UK - 17 Dec 2007 14:36 GMT
With your text date in A1, try this in B1:
=DATE(LEFT(A1,4),MID(A1,5,2),(RIGHT(A1,2))
Hope this helps.
Pete
> A database query program outputs everything as a text string. One of
> the fields is a date, formatted as yyyymmdd. Is there a worksheet
> function that will change this to an Excel-recognized date? Or a
> macro? The error checking doesn't flag this.
>
> Ed
JE McGimpsey - 17 Dec 2007 14:45 GMT
Don't need a macro - Select your dates and choose Data/Text to Columns.
Click Next, Next, then choose yymmdd from the Date dropdown. Click
Finish. Format the dates as desired.
In article
<250cc4a4-a397-4f3b-b19b-00337981a990@e6g2000prf.googlegroups.com>,
> A database query program outputs everything as a text string. One of
> the fields is a date, formatted as yyyymmdd. Is there a worksheet
> function that will change this to an Excel-recognized date? Or a
> macro? The error checking doesn't flag this.
>
> Ed
Ed from AZ - 17 Dec 2007 17:35 GMT
That worked great!!
Thanks!!
Ed
> Don't need a macro - Select your dates and choose Data/Text to Columns.
> Click Next, Next, then choose yymmdd from the Date dropdown. Click
[quoted text clipped - 11 lines]
>
> - Show quoted text -