Computing.Net > Forums > Office Software > Date Format Problem in Excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Date Format Problem in Excel

Reply to Message Icon

Name: jdang307
Date: October 8, 2008 at 10:26:13 Pacific
OS: XP
CPU/Ram: P4/2GB
Product: Intel
Comment:

I have several large trade blotters I exported from our portfolio trading platform. Problem is, with the date, when it exports to excel, it exports the date as a single integer. For example, 05/15/2008 becomes 51508. 11/15/2008 becomes 111508. Pain the butt right?

Is there any possible formula that I can use convert these to regular date format? That way I can use the formula to get the correct date format, then copy special back into the correct column. There are literally thousands of entries so of course I don't want to manually do this.

Thanks in advance!




Sponsored Link
Ads by Google

Response Number 1
Name: jdang307
Date: October 8, 2008 at 10:58:58 Pacific
Reply:

Ok I think I have it almost figured out. I can use a conditional formula to run the date. I found the following formula:

=VALUE(LEFT(C1,2)&"/"&MID(C1,3,2)&"/"&RIGHT(C1,2))

That works for dates that have 6 numbers in it. So then using my super duper excel deduction skills, I made the following formula:

=VALUE(LEFT(C1,1)&"/"&MID(C1,3,2)&"/"&RIGHT(C1,2))

for dates with 5 numbers in it. It works. So now, I need to make the following formula:

=IF(XXX,VALUE(LEFT(C1,1)&"/"&MID(C1,3,2)&"/"&RIGHT(C1,2)),VALUE(LEFT(C1,2)&"/"&MID(C1,3,2)&"/"&RIGHT(C1,2)))

Shouldn't that work? Now I have to find the formula that counts how many numbers are in the cell.

EDIT: I tried this formula:
=IF(LEN(D4)=5,VALUE(LEFT(D4,1)&"/"&MID(D4,2,2)&"/"&RIGHT(D4,2)),VALUE(LEFT(D4,2)&"/"&MID(D4,3,2)&"/"&RIGHT(D4,2)))

Got it after several edits and tries.


0

Response Number 2
Name: DerbyDad03
Date: October 8, 2008 at 12:00:33 Pacific
Reply:

I'm curious as to why the import drops the slashes in the first place.

Fix that and you don't need any formulae.


0

Response Number 3
Name: jdang307
Date: October 8, 2008 at 13:13:19 Pacific
Reply:

It's a dumb program that doesn't import perfectly. That's all I can think of. Our other program does it just fine.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Date Format Problem in Excel

cell formatting problem in excel www.computing.net/answers/office/cell-formatting-problem-in-excel/4911.html

page setup problem in Excel www.computing.net/answers/office/page-setup-problem-in-excel/992.html

Type of column in EXCEL www.computing.net/answers/office/type-of-column-in-excel/2162.html