#1   Report Post  
Brian
 
Posts: n/a
Default subtracting dates

I take a report from Crystal Reports and export it to excel. One of the
columns is a date field. In excel I inserted a new column and would like to
have the fields tell me how old the record is, in days. Rather than have to
type todays date into every field I wanted to refer to a field with todays
date, but I can't get the Days360 command to work like that. It seems that it
only works when both dates are present, and both are in "". Basically what I
did looks like this Days360(A4,B5). A4 is todays date and B5 is the record's
date. Is there a better way to do this?
  #2   Report Post  
Sloth
 
Posts: n/a
Default subtracting dates

Just use

=Today()-A1

A1 being the cell your date is in. Format the cell as a number and you will
get the number of days between the two dates. There is really no reason to
ever use Days360. Days are stored as the number of days from 1/0/1900
(1/1/1900 is equal to 1). You can not use any date before 1/1/1900 or after
12/31/9999.

"Brian" wrote:

I take a report from Crystal Reports and export it to excel. One of the
columns is a date field. In excel I inserted a new column and would like to
have the fields tell me how old the record is, in days. Rather than have to
type todays date into every field I wanted to refer to a field with todays
date, but I can't get the Days360 command to work like that. It seems that it
only works when both dates are present, and both are in "". Basically what I
did looks like this Days360(A4,B5). A4 is todays date and B5 is the record's
date. Is there a better way to do this?

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default subtracting dates

Why use Days360, and why not use TODAY() in the formula

=TODAY()-A1

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Brian" wrote in message
...
I take a report from Crystal Reports and export it to excel. One of the
columns is a date field. In excel I inserted a new column and would like

to
have the fields tell me how old the record is, in days. Rather than have

to
type todays date into every field I wanted to refer to a field with todays
date, but I can't get the Days360 command to work like that. It seems that

it
only works when both dates are present, and both are in "". Basically what

I
did looks like this Days360(A4,B5). A4 is todays date and B5 is the

record's
date. Is there a better way to do this?



  #4   Report Post  
Brian
 
Posts: n/a
Default subtracting dates

Yes, thank you. The post ahead of your said the same thing. I tried it and it
works great!

Thanks.



"Bob Phillips" wrote:

Why use Days360, and why not use TODAY() in the formula

=TODAY()-A1

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Brian" wrote in message
...
I take a report from Crystal Reports and export it to excel. One of the
columns is a date field. In excel I inserted a new column and would like

to
have the fields tell me how old the record is, in days. Rather than have

to
type todays date into every field I wanted to refer to a field with todays
date, but I can't get the Days360 command to work like that. It seems that

it
only works when both dates are present, and both are in "". Basically what

I
did looks like this Days360(A4,B5). A4 is todays date and B5 is the

record's
date. Is there a better way to do this?




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 to get hours... but I want to skip weekends shadestreet Excel Discussion (Misc queries) 2 October 5th 05 06:20 PM
Subtracting dates? Bill R Excel Worksheet Functions 1 August 15th 05 05:37 AM
Subtracting dates: 8/31/05-8/1/05? dstock Excel Discussion (Misc queries) 1 July 26th 05 04:04 PM
subtracting dates to get a age Lori Excel Discussion (Misc queries) 1 February 4th 05 03:49 PM
Dates Subtracting dates. help me Excel Discussion (Misc queries) 4 December 17th 04 03:48 AM


All times are GMT +1. The time now is 02:01 AM.

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"