Solved

convert custom to date

Posted on 2014-02-17
6
265 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
Technology Partners: 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 250 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 250 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

685 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