Question

Date shows as a number

Asked by: paquicuba

I received an Excel spreadsheet containing two columns with date values. However, the only way I can see the actual dates is if I select a specific cell, otherwise all I see is a number.
e.g. 3/16/2007 shows as 39157 (left aligned)
I've been trying to format the columns to a date using the Date and Custom formats; I've tried copying and pasting values; I've tried using the hyphens '--' and nothing seems to work.
Could it be a compatibility issue, since I have Excel 97? --I don't know what version the other party has.
Could someone please shed a light on this issue?


Thanks a lot!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2007-04-04 at 10:51:03ID22492484
Tags

excel

,

date

,

number

,

shows

Topic

Microsoft Excel Spreadsheet Software

Participating Experts
2
Points
500
Comments
17

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Insert hyphens create SSN
    This should be relatively easy What I need to do is this: FOR EACH ROW (more specifically C2 - C (last row) ) Take the nine digits 111111111 Insert hypens (creating SSNs) 111-11-1111 *I know what you are thinking --- reformat the cell as special - SSN That is the resul...
  2. Remove hyphen from number
    i have a spread sheet with columns of SNN, Phone#, Zip+4. Each cell has hyphens within the numbers. Is there an easy way of getting rid of the hyphens with out manually deleting them? Thanks tom
  3. Remove hyphen and all to the right of it
    Hi, I have this macro that formats the data inside cells. Specifically, with the click of the button, if a cell in the zip column (Dig5Col)is found to have a hyphen in it as well as some characters (or numbers) to the right of it, then I want to remove both the hyphen and th...
  4. importing data using hyphens and leading zeros
    I am importing data from sap. The data is product codes with format as such, 000234-0456. After importing to excel I need to hide the leading zeros before and after the hyphen for a whole column of data. Also some data cells have a p00 in front of the product code. delete...
  5. Excel 2003: Count all cells with a hyphen
    Hi: I need a formula, probably a "counta" formula that wuill count all cells in a list that have a hyphen and all those that do not. Thanks Charlie points for urgency!!!

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: zorvekPosted on 2007-04-04 at 10:54:55ID: 18852367

You are saying that when you select the cell you see "3/16/2007"? Where? In the cell or in the formula entry field?

Kevin

 

by: byundtPosted on 2007-04-04 at 10:55:39ID: 18852372

Your "dates" are probably text. You'll need to convert them to real numbers, before formatting them.

One common reason formulas don't work is if the "numbers" or "dates" are text that looks like numbers or dates. You can test this possibility by trying to change the format of the cell. If this works, then the cell contains a number or date/time serial number. If it doesn't, then you need to convert them. Changing the format from text to a number format won't change the data--it will still be text as you can see from a formula like:
=ISTEXT(A1)        returns TRUE if value is text (even if cell is formatted as a number and the contents look like a number)
=ISNUMBER(A1)    returns TRUE if value really is a number (even if cell is formatted to display text like Friday, January 1, 2005)

A few easy ways to convert them are:
1) Copy a blank cell
2) Select the cells to convert
3) Edit...Paste Special...Add
4) Format the cells as desired

A macro to do this is quite simple. It goes in a regular module sheet. To use it, select the cells to be converted, then run the macro.

Sub TextToNumbers()
Dim rg As Range
On Error Resume Next
Set rg = Selection
    rg.NumberFormat = "General"
    rg.Value = rg.Value
On Error GoTo 0
End Sub

Another way to convert text to numbers uses the Data...Text to Columns menu item. One benefit of this approach is that you can specify the format of dates (such as if they were exported with leading zeros as mmddyy). You can also throw away part of the data (if you want).
1) Select the cells to be converted
2) Open the Data...Text to Columns menu item
3) In the first step of the wizard, choose "Delimited" ("Fixed if you want to get rid of certain information)
4) Click "Next" twice
5) In the third step of the wizard, you can specify whether a column contains text or dates. Choose General if the column contains numbers. If you choose Dates, specify the format in the dropdown to the right.
6) Click "Finish"

 

by: paquicubaPosted on 2007-04-04 at 10:57:57ID: 18852383

>> Where? In the cell or in the formula entry field?
I see the number in the cell and the date in the formula entry field...

 

by: zorvekPosted on 2007-04-04 at 11:00:50ID: 18852403

This is a little bit odd...would you mind posting the file for us so we can take a look at it?

Files can be posted any of a number of ways.

The prefered method at this time is to use the Experts Exchange file sharing site. It is available to all registered Experts Exchange members and it is free. First zip the file or files to be posted. Then navigate to http://www.ee-stuff.com, click Login in the upper right corner, enter your Experts Exhange user name and password, click the Login command button, navigate to Expert Area, and click "Upload a new file". Enter the complete URL of the question, or the Question ID into the text box labeled "Question", and then click "Browse..." to select the desired file to upload. The question ID is the eight-digit number after the "Q_" in the question URL. Type a comment describing the file. Click "Upload" to upload the file. A page will then be presented with a URL that can be posted in the Experts-Exchange question so that others can download the file.

There are other free file sharing services available:

Geocities: http://geocities.yahoo.com/ps/learn2/HowItWorks4_Free.html
AngelFire: http://www.angelfire.lycos.com/doc/subscriptions/index.html
Google: http://base.google.com/base/default
RapidUpload: http://www.rapidupload.com/

If you do not want to use any of these services you can send your file to me using the email address in my profile (http://www.experts-exchange.com/M_1677072.html) and I will post it on my own site.

Kevin

 

by: byundtPosted on 2007-04-04 at 11:01:40ID: 18852410

Is this a protected worksheet? It could be that the cell is formatted as number, and won't let you change the formatting to a date format.

 

by: paquicubaPosted on 2007-04-04 at 11:06:35ID: 18852443

It's not protected and I got it through an email. I cannot share it, since it contains company's confidential information.

 

by: paquicubaPosted on 2007-04-04 at 11:09:18ID: 18852457

Yes it's odd. I cannot not even type a formula; nothing works here even if I type =ISTEXT(A1) in the IV column.

 

by: zorvekPosted on 2007-04-04 at 11:10:37ID: 18852471

What is displayed when you enter a formula?

Kevin

 

by: zorvekPosted on 2007-04-04 at 11:11:36ID: 18852477

Choose Tools->Options, navigate to the View tab, and uncheck Formulas in the Show section.

Kevin

 

by: byundtPosted on 2007-04-04 at 11:12:37ID: 18852487

1) Is this workbook by chance Shared (using the Tools...Share workbook menu item)? Shared workbooks are notorious for corruption.
2) If you copy the cell to a new workbook, does it continue to behave the same way? Or are you now able to format it?
3) Try looking at the file on a different computer. If it works there, perhaps you have corruption in your Excel install. And if not, at least we know the problem is isolated to one workbook.

 

by: paquicubaPosted on 2007-04-04 at 11:12:42ID: 18852488

Dear experts,

It looks like the spreadsheet is corrupted or it was not created with Excel or something else... I copied everything and moved it to a blank spreadsheet and now I can see the dates.

Thanks a bunch for your suggestions!

 

by: zorvekPosted on 2007-04-04 at 11:13:50ID: 18852499

The problem is that you had the Show Formulas option set. To turn it off choose Tools->Options, navigate to the View tab, and uncheck Formulas in the Show section.

Kevin

 

by: paquicubaPosted on 2007-04-04 at 11:14:48ID: 18852508

I just did this:
Choose Tools->Options, navigate to the View tab, and uncheck Formulas in the Show section.

and it worked...

What's the deal with unchecking formulas?

 

by: paquicubaPosted on 2007-04-04 at 11:21:29ID: 18852569

>> uncheck Formulas in the Show section
I unchecked Formulas in the "Window Options" section, not in the "Show section"
Anyway, it worked...
Do you know why was "Formulas" checked in that spreadsheet -- I just want to make the sender aware of it...

Thanks a bunch!

 

by: zorvekPosted on 2007-04-04 at 11:28:07ID: 18852619

When you check that option on Excel displays the formula in the cell instead of the calculated value. In terms of the date, it displays the raw internal value versus the formatted display value. For the future, the shortcut to toggle this setting is CTRL+LEFT SINGLE QUOTE (the key above the tab key).

Kevin

 

by: zorvekPosted on 2007-04-04 at 11:29:28ID: 18852630

>Do you know why was "Formulas" checked in that spreadsheet
No idea. You would have to ask the sender that question. It's certainly a way of working with any worksheet with formulas. I use it myself occasionally. My guess is they just forgot to turn it off.

Kevin

 

by: paquicubaPosted on 2007-04-04 at 11:40:05ID: 18852716

Thanks a million Kevin. You did a great job!!

I appreaciate your comments as well Byundt...

; )

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...