Date Format

A

AdrianChua01

Hi

I copy a SQL Query output and place it into Excel. The time column
shows dates as
4/7/2006 4:02:10 AM, 2/28/2006 10:37:39 AM, 3/1/2006 1:56:40 PM.

IS there a way to get rid of the hr, min and secs ? I used the format
cells function on eg
4/7/2006 4:02:10 AM, 2/28/2006 10:37:39 AM, 3/1/2006 1:56:40 PM.

and the columns show

4/7/2006, 2/28/2006, 3/1/2006.

However, when you select the each cell, it still actually retains the
values as

4/7/2006 4:02:10 AM, 2/28/2006 10:37:39 AM, 3/1/2006 1:56:40 PM

I need the dates only because I am plotting a graph. With the hr, min
and sec functions included in the date, there would be 1000 times the
amount of x-coordinate points.

Can anyone shed some light? thanks!
 
A

Ardus Petus

Assuming your date/time is in A1,

To get rid of time and keep date only, enter formula:
=INT(A1)

HTH
 
J

jim

To make sure I'm understanding the problem correctly, is the only
formatting issue really with the chart? If so, you should be able to
format the date value on the axis itself (regardless of how the cell
containing the value is formatted). For example, on a line graph you
could double click the values in the x-axis and choose Number > Date >
and select the appropriate format.
 
A

AdrianChua01

Thank you much Ardus. It works perfectly. Thanks Jim, for your input
as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top