Solved

convert custom to date

Posted on 2014-02-17
6
263 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

829 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