Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nmp
 
Posts: n/a
Default Ignoring Time in a Date Time Calculation

I am being provided data with a date/time stamp where I want to calculate if
there is a difference between two dates, but ignore the time. Example: in
cell A2 I have 11/22/2005 0:00 and in cell B2 I have 11/22/2005 12:00 and my
current formula is IF(B2A2,1,0) and it is giving me a result of 1. I want
the formula to ignore the time and give me a result of 0 because the dates
are the same. I already tried just reformating A2 and B2, but that did not
work. The time data is still there in the background.

Thanks!
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Ignoring Time in a Date Time Calculation

You can use

IF(INT(B2)INT(A2),1,0)

--

Regards,

Peo Sjoblom

"nmp" wrote in message
...
I am being provided data with a date/time stamp where I want to calculate

if
there is a difference between two dates, but ignore the time. Example: in
cell A2 I have 11/22/2005 0:00 and in cell B2 I have 11/22/2005 12:00 and

my
current formula is IF(B2A2,1,0) and it is giving me a result of 1. I

want
the formula to ignore the time and give me a result of 0 because the dates
are the same. I already tried just reformating A2 and B2, but that did

not
work. The time data is still there in the background.

Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nmp
 
Posts: n/a
Default Ignoring Time in a Date Time Calculation

Thanks Peo! That worked!

"Peo Sjoblom" wrote:

You can use

IF(INT(B2)INT(A2),1,0)

--

Regards,

Peo Sjoblom

"nmp" wrote in message
...
I am being provided data with a date/time stamp where I want to calculate

if
there is a difference between two dates, but ignore the time. Example: in
cell A2 I have 11/22/2005 0:00 and in cell B2 I have 11/22/2005 12:00 and

my
current formula is IF(B2A2,1,0) and it is giving me a result of 1. I

want
the formula to ignore the time and give me a result of 0 because the dates
are the same. I already tried just reformating A2 and B2, but that did

not
work. The time data is still there in the background.

Thanks!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Split combined date time data Mark Ada Excel Discussion (Misc queries) 1 December 1st 04 05:55 AM
Split combined date time data Mark Ada Excel Discussion (Misc queries) 1 December 1st 04 03:52 AM
split combined Time Date cells Mark Ada Excel Discussion (Misc queries) 2 December 1st 04 03:06 AM
Date and Time Macro m.j.anderson Excel Discussion (Misc queries) 1 December 1st 04 12:35 AM


All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"