Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Excell date formatting question

Posted on 2012-04-05
Medium Priority
365 Views
Hi guys,

I currently have a row in excel with the data in the following format 9903 (yymm) I need to format this into a date and I can't get it work, I don't see any options in excel with the (yymm) formatting.
My final goal is to convert that date to years to get the age of an account.

Any help will be great!
Thanks.
0
Question by:exTechnology
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 49

Assisted Solution

Martin Liss earned 400 total points
ID: 37813122
Format->Number->Custom

and then yymm
0

LVL 13

Expert Comment

ID: 37813196
0

LVL 43

Accepted Solution

Saqib Husain, Syed earned 800 total points
ID: 37813197
if your data is in A1 then you can try

=date(left(a1,2),right(a1,2),1)
0

LVL 2

Author Comment

ID: 37813231
my expected result is to format the date that is currently raw 9902 (yymm) to an age, the amount of years from today's date.
0

LVL 43

Assisted Solution

Saqib Husain, Syed earned 800 total points
ID: 37813252
Then try

=year(today())-left(A1,2)
0

LVL 13

Assisted Solution

Shanan212 earned 400 total points
ID: 37813759
partially using ssaqibh's formula:

``````=ROUND((TODAY()-DATE(LEFT(A1,2),RIGHT(A1,2),1))/365,0)
``````

Using today, this would yeild 13 (years)
0

LVL 81

Assisted Solution

byundt earned 400 total points
ID: 37814593
If you require full years difference, then you might try:
=DATEDIF(--(RIGHT(A1,2) & "/" & LEFT(A1,2)),TODAY(),"y")
0

LVL 83

Expert Comment

ID: 37816511
remember that saquib's solution do NOT change the formatting of the column A (do not use custom formatting yymm)
0

## Featured Post

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
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…
###### Suggested Courses
Course of the Month9 days, 11 hours left to enroll