Changing date and time to date only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I have a cell with date and time that I want to convert to date only - I
have tried so many things. Can anyone tell me the secret function?
 
Dates are stored internally as integers (number of elapsed days since
a reference date of 1st Jan 1900) and times are stored as fractions of
a 24-hour day. So, if you have a date-time in A1, this will give you
the date-only part:

=INT(A1)
or =ROUND(A1,0)

Hope this helps.

Pete
 
Pete,

Just a warning to the OP as I am sure you know,

=ROUND(A1,0)

Will give you the date in A1 or the next day depending in the time that is
being held in A1.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
(e-mail address removed) with @tiscali.co.uk
 
Yeah, you're right Sandy. I suppose it ought to be:

=ROUNDDOWN(A1,0)

if the OP only wants the date.

Thanks.

Pete
 

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

Back
Top