Solved

How to remove time?

Posted on 2011-02-11
5
293 Views
Last Modified: 2012-05-11
I've tried to format the column in the included file so time removed.  However, it has no affect.  What else should I do?
DateFormatTest.xls
0
Comment
Question by:brettr
[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
  • Learn & ask questions
  • 3
5 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 300 total points
ID: 34875946
Hello brettr

Your data is text formatted and appears to start with a CHAR(160) character

You can get rid of that character using Edit > Replace

Select column then

In the "find what" box use the number pad to insert ALT+0160 and leave the "Replace with" box empty. That should convert the data to true dates and you can format any way you want.

The underlying data will still have a time even if you don't display it. If you want to eradicate the time completely you could use a formula in the next column to get date only, i.e. in B2 copied down

=INT(A2)

regards, barry
0
 
LVL 33

Assisted Solution

by:jppinto
jppinto earned 100 total points
ID: 34875961
=DATE("20" &MID(A2,8,2),MID(A2,5,2),MID(A2,2,2))

Please check the attached file.

jppinto
DateFormatTest-1-.xls
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34875971
See the attached.

I used the Edit > Replace as suggested to convert column A and then I formatted that column to still show the time (although you can now format any way you want - e.g. without time)

Column B has the time removed using INT function. If you format to show time as I have done then all time values are 00:00

regards, barry
26816406.xls
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34875993
....if you want a formula that will remove the extra charcater and the time all in one go then you could use this formula in B2

=INT(SUBSTITUTE(A2,CHAR(160),""))

That will accommodate situations where you have 1 extra character as your data seems to, or any other number including zero. It will also allow different date formats, e.g. month shown as a single digit

regards, barry
0
 
LVL 5

Assisted Solution

by:foochar
foochar earned 100 total points
ID: 34876004
The date strings appear to be text, not actual numeric date values.  If you just need them reformatted into strings without the time you can use this formula (adjusting the cell reference of A2 as appropriate for you data): =CONCATENATE(MID(A2,2,2),"/",MID(A2,5,2),"/",MID(A2,8,2)) .  This is assuming all the dates are formated with 2 digit months, days and years.

If you actually need this to be treated by excel as a date that you can sort on by actual date etc then you'll want to use =DateValue(CONCATENATE(MID(A2,2,2),"/",MID(A2,5,2),"/",MID(A2,8,2))) and then format the field.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

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 …
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.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

707 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