Changing date and time to date only

C

canuckinnj

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?
 
P

Pete_UK

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
 
S

Sandy Mann

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

[email protected]
[email protected] with @tiscali.co.uk
 
P

Pete_UK

Yeah, you're right Sandy. I suppose it ought to be:

=ROUNDDOWN(A1,0)

if the OP only wants the date.

Thanks.

Pete
 
Top