Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Subtracting Dates

I have a worksheet with two date ranges in the following formats.

20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out +/-
days that they made their discount.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Subtracting Dates

Assuming the two dates are in A1 and B1, put this in C1:

=DATE(LEFT(B1,4),MID(B1,5,2),RIGHT(B1,2))-
DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

Format C1 as a number with 0 dp.

Hope this helps.

Pete

On May 29, 7:05*pm, jaxstraww
wrote:
I have a worksheet with two date ranges in the following formats.

20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out +/-
days that they made their discount.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Subtracting Dates

If these are excel dates formatted as indicated below then

a1-b1

if they are numbers than

=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))-DATE(LEFT(B1,4),MID(B1,5,2),RIGHT(B1,2))

"jaxstraww" wrote:

I have a worksheet with two date ranges in the following formats.

20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out +/-
days that they made their discount.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default Subtracting Dates

suppose in A1 = 20070115 & B1 = 20070117
then put in C1
=DAYS360(DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2)), DATE(LEFT(B2,4),MID(B2,5,2),RIGHT(B2,2)))



On May 29, 11:05*pm, jaxstraww
wrote:
I have a worksheet with two date ranges in the following formats.

20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out +/-
days that they made their discount.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default Subtracting Dates

sorry

C1
=DAYS360(DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)), DATE(LEFT(B1,4),MID(B1,5,2),RIGHT(B1,2)))

On May 29, 11:21*pm, muddan madhu wrote:
suppose in A1 = 20070115 & B1 = 20070117
then put in C1
=DAYS360(DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2)), DATE(LEFT(B2,4),MID(B2,5,*2),RIGHT(B2,2)))

On May 29, 11:05*pm, jaxstraww
wrote:



I have a worksheet with two date ranges in the following formats.


20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out +/-
days that they made their discount.- Hide quoted text -


- Show quoted text -




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 123
Default Subtracting Dates

If those are actual dates that have been formatted to look like 8
digit numbers then you can just subtract to find the difference. If,
however, you have typed in 8 digit number but are reading them as
dates then you are facing much more work to manage this.

On May 29, 2:05 pm, jaxstraww
wrote:
I have a worksheet with two date ranges in the following formats.

20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out +/-
days that they made their discount.


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Subtracting Dates

You could do this...

=TEXT(B1,"0000-00-00")-TEXT(A1,"0000-00-00")

Make sure the cell is formatted as General or Number.

Rick


"jaxstraww" wrote in message
...
I have a worksheet with two date ranges in the following formats.

20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out
+/-
days that they made their discount.


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Subtracting Dates

Muddan,

Days360 will not properly subtract (or add) dates, because it assumes 30
days per month. See the other reponses for valid solutions. If you are
looking to be of help to posters, test your suggestions to make sure they
work before posting them.

Regards,
Fred.

"muddan madhu" wrote in message
...
sorry

C1
=DAYS360(DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)), DATE(LEFT(B1,4),MID(B1,5,2),RIGHT(B1,2)))

On May 29, 11:21 pm, muddan madhu wrote:
suppose in A1 = 20070115 & B1 = 20070117
then put in C1
=DAYS360(DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2)), DATE(LEFT(B2,4),MID(B2,5,*2),RIGHT(B2,2)))

On May 29, 11:05 pm, jaxstraww
wrote:



I have a worksheet with two date ranges in the following formats.


20070115 & 20070117 as an example. I need to fiind the days between each
item. What we have are discount dates and pay dates. Trying to find out
+/-
days that they made their discount.- Hide quoted text -


- Show quoted text -


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
Subtracting Dates jaxstraww Excel Discussion (Misc queries) 0 March 28th 07 01:58 AM
Subtracting Dates jaxstraww Excel Discussion (Misc queries) 0 March 28th 07 01:56 AM
Subtracting Dates sam Excel Discussion (Misc queries) 3 March 2nd 06 12:47 PM
subtracting dates Brian Excel Discussion (Misc queries) 3 October 27th 05 07:54 PM
Subtracting dates? Bill R Excel Worksheet Functions 1 August 15th 05 05:37 AM


All times are GMT +1. The time now is 05:43 AM.

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

About Us

"It's about Microsoft Excel"