Solved

How to remove time?

Posted on 2011-02-11
5
289 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
  • 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
Outlook Free & Paid Tools
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now