Calculating with Dates

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Calculating with Dates

Boika Mileva
Dear colleagues!

I would be grateful if some of you tells me how could I add a numeric
field, which contains number of days to a date field and get another date
field and that to compare this date field with another date field.

Thank you in advance!

With best wishes:

Boika Mileva
Reply | Threaded
Open this post in threaded view
|

Re: Calculating with Dates

Melissa Ives
Check out Help under "date and time functions".  There are several ways
there, but here are a couple that are most apropos...

The DATESUM function calculates a date or time value a specified number
of units from a given date or time value. The general form of the
function is:

DATESUM(datevar, value, "unit", "method").

The DATEDIFF function calculates the difference between two date values
and returns an integer (with any fraction component truncated) in the
specified date/time units. The general form of the expression is:

DATEDIFF(datetime2, datetime1, "unit").


Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Boika Mileva
Sent: Monday, August 13, 2007 2:37 PM
To: [hidden email]
Subject: [SPSSX-L] Calculating with Dates

Dear colleagues!

I would be grateful if some of you tells me how could I add a numeric
field, which contains number of days to a date field and get another
date field and that to compare this date field with another date field.

Thank you in advance!

With best wishes:

Boika Mileva


PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.
Reply | Threaded
Open this post in threaded view
|

Re: Calculating with Dates

Boika Mileva
In reply to this post by Boika Mileva
Thank you very much, Melissa! You helped me not for first time! :)

I wish you all the best!!!

Boika