Getting rid of the time/date serial number

Lorlai

Board Regular
Joined
May 26, 2011
Messages
85
For some reason, when I compare two dates, excel is only reading the serial number. How can I get just the date/time stamp, not the serial number?

For example, I want 08/10/2011 12:00:00 PM, not 389985...


Thank you!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
If you have this in cell A1:

=A1-INT(A1)

You subtract the integer part of the date, so that only the decimals remain. These are used to indicate fractions of a day (=1)
 
Upvote 0
My formula is comparing cells. So in DZ1, the formula is =A1=A20. Would this be affecting the serials?
 
Upvote 0
Do you need to remove the days from both A1 and A20?
 
Upvote 0
I'm not removing anything, just comparing. Full formula is

=IF(CE748=CE12747,CE748,"!" & CE748)

I want to keep the full date/time, and only add a ! if they do not equal
 
Upvote 0
For example

=IF(INT(CE748)=CE12747,"","!") & CE748

This is a gues, you did not provide any more details about your cells and their values.
 
Upvote 0
Thanks for the formula. It didn't work in this situation.

I'm not sure what further details I can provide....

I have a large amount of data, and some of this data includes dates, and date/times. For instance, on cell t1 the date/time is 11/30/2010 12:00:00 AM, and is the same on cell t12000. In theory, the formula should give 11/30/2010 12:00:00 AM. Instead, the formula yields 40512.

What else can I provide to maybe help this?

Thank you!
 
Upvote 0
What else can I provide to maybe help this?

- What is the real cell contents of cells CE748 and CE12747? (Look at the cell contents, not how it is formatted in the cell).

- What should be the result of the formula?
 
Upvote 0
The Real Cell Content of CE748 is 11/30/2010 0:00. The real cell content of CE12747 is 05/30/2011 0:00. The Result should look like !11/30/2010 0:00 (the same as CE748 with an ! added to the beginning).

Is this more clear?
 
Upvote 0
Maybe this attempt?

=IF(CE748-INT(CE748)=CE12747-INT(CE12747),"","!") & TEXT(CE748,"mm/dd/yyyy h:mm")
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top