Data and Time subtaction....

  • Thread starter Thread starter bruness
  • Start date Start date
B

bruness

Hello.
I have the folowing problem.

-|------A------|----B--------------------------
1| Last Update:| 29-01-2004 15:17:23
2|-------------|---------------------------------
3|-------------|-----------------------

The cell B1 is called "updates"
And it update automatic the Date when i save my work.
Now i have in cell B3 the following formula:
=IF((TODAY()-B1)=0;"This List is Actualized";"This List Is not
Actualized for: "&(TODAY()-B1)&" Days")

In B3 the result of this formula is: This List Is not Actualizes for:
-0.637071759258106 Day

But this is not what i want, what i want is:
That in B3 give me the number of days that the list is not actualized,
and if the list is actualized it give The list is Actualizes.

ex. if i save the list in day 29-01-2004, the resulting formula is
"This list is Actualized"
But if i open the work in the next day the formula give me:
!This List is not Actualied for 1 Day.
 
bruness > said:
Hello.
I have the folowing problem.

-|------A------|----B--------------------------
1| Last Update:| 29-01-2004 15:17:23
2|-------------|---------------------------------
3|-------------|-----------------------

The cell B1 is called "updates"
And it update automatic the Date when i save my work.
Now i have in cell B3 the following formula:
=IF((TODAY()-B1)=0;"This List is Actualized";"This List Is not
Actualized for: "&(TODAY()-B1)&" Days")

In B3 the result of this formula is: This List Is not Actualizes for:
-0.637071759258106 Day

But this is not what i want, what i want is:
That in B3 give me the number of days that the list is not actualized,
and if the list is actualized it give The list is Actualizes.

ex. if i save the list in day 29-01-2004, the resulting formula is
"This list is Actualized"
But if i open the work in the next day the formula give me:
!This List is not Actualied for 1 Day.

You need to convert the number of days to text:
=IF((TODAY()-B1)=0;"This List is Actualized";"This List Is not Actualized
for: "&TEXT(TODAY()-B1,"#")&" Days")
 
TODAY returns the date, but B1 contains the date + the time.
You need to change your test to use the date part of B1 and ignore the time
part.
Try
=IF(TODAY()-INT(B1)=0,...
or
=IF(TODAY()=INT(B1),...
 
Back
Top