#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default Subtract Date Q

How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Subtract Date Q

Have you tried looking in the help index for DATE

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sean" wrote in message
...
How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 897
Default Subtract Date Q

Check out:

http://tinyurl.com/28kcfq
http://www.cpearson.com/excel/datetime.htm

HTH,
JP

On Jan 28, 10:35*am, Sean wrote:
How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Subtract Date Q

Either:

=date(2008,1,28)-date(2008,1,25)
or
="28/01/08"-"25/01/08"

Regards,
Fred

"Sean" wrote in message
...
How do you subtract 2 dates within a formula?

eg =(28/01/08)-(25/01/08)

I know if A1= 28/01/08 and B1= 25/01/08 I could enter =A1-B1. But if I
wish just to hard code within a formula these values.

How does one do that?


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
how do I subtract time from a date to get an earlier date? Sunny_Dreams Excel Discussion (Misc queries) 5 February 11th 09 05:58 PM
Formula to subtract a date from current date Fidelio1st Excel Worksheet Functions 3 February 27th 06 03:36 AM
Text to date then subtract... ryan Excel Discussion (Misc queries) 5 December 7th 05 06:09 PM
How do I subtract a date from a date for a sum of total years? Paige Excel Discussion (Misc queries) 4 October 27th 05 03:10 PM
how can i subtract time from two different date? Manoo Excel Worksheet Functions 1 March 8th 05 04:00 AM


All times are GMT +1. The time now is 01:16 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"