Copy the Date

July 19, 2011 at 11:21:33
Specs: Windows 7
I have an SQL generated spreadsheet that returns the dates as 20010719 (Today's date). I was wondering how I can insert the =date() formula into the column and copy down to correctly display the date and utilize a pivot table.

Thank you in advance!

See More: Copy the Date

Report •

July 19, 2011 at 12:01:35
If your importing the date, there is a good chance it will be seen by Excel as TEXT.

Try this: =DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

This will work for a string that has; a four digit year 2001, a two digit month 07, and a two digit day 19

With no type of delimiter to separate out the various parts of the string,
you will have to modify the above as needed for other dates.

It's the month and day that usually get fouled up.


Report •

July 19, 2011 at 17:39:29
re: 20010719 (Today's date)

2001? It took 10 years for someone to answer this question?

Man, we're falling down on the job!

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

Related Solutions

Ask Question