Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

convert custom to date

Posted on 2014-02-17
6
Medium Priority
?
277 Views
Last Modified: 2014-02-17
I have a column in excel (formatted custom 00000000) which actually represents a date. Is there any easy way to change the format to dd/mm/yyyy? WHen I cut and paste it elsewhere and re-apply the formatting, the dates go all over the place.
0
Comment
Question by:pma111
  • 3
  • 2
6 Comments
 
LVL 19

Expert Comment

by:regmigrant
ID: 39864898
if your 'date' is in a1 and is formatted as (for example) 17022014 (ie: today)
=DATE(RIGHT(a1,4),MID(a1,3,2),LEFT(a1,2)) will give you a formatted date

post an example if that's not what the right interpretation
0
 
LVL 3

Author Comment

by:pma111
ID: 39864913
Just tried this, the original date (1st april 2013)

01042013      

returned (with the above formula):

00042531
0
 
LVL 3

Author Comment

by:pma111
ID: 39864918
formatted the column dd/mm/yyyy then reapplied the formula, but its still off.

for example

02022014

returns (with the above formula)

20/10/2015
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Accepted Solution

by:
regmigrant earned 1000 total points
ID: 39864951
ok, the formula is losing the leading 0 because they are numbers, assuming you don't want to put an apostrophe in front of them all :-

=DATE(RIGHT(TEXT(B31,"00000000"),4),MID(TEXT(B31,"00000000"),3,2),LEFT(TEXT(B31,"00000000"),2))
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 1000 total points
ID: 39865686
If you use TEXT function like this it will handle single or double digit days

=TEXT(A1,"00-00-0000")+0

Format as dd/mm/yyyy

regards, barry
0
 
LVL 19

Expert Comment

by:regmigrant
ID: 39865713
always believe Barry :)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question