Hi All,
I have a date conversion problem.
1. I've calculated the difference between dates from field#1 and field#2
2. I want to add 90 days to the above calculation. ( result example (
07/21/2006 )
3 On result from # 2 above, I want to indicate the 1st of the month.
( eg: 07/01/2006 )
Please Help.
Thanks in advance.
Michel Walsh - 17 Jan 2006 18:50 GMT
Hi,
1-
DateDiff("d", pastDate, recentDate)
That results into a number of days! not into a date
2-
90 + someDate
will result into a date 90 days after the given date
3-
Day( 90 + someDate)
gives the day, of the month, of the date supplied by 90+ someDate, so
90+someDate -Day(90+someDate)
gives the last day of the last month, and
91 + someDate - Day(90+someDate)
gives one day after, what you want, the first day of the implied
month-year in 90+someDate.
Hoping it may help,
Vanderghast, Access MVP
> Hi All,
>
[quoted text clipped - 12 lines]
>
> Thanks in advance.
Marshall Barton - 17 Jan 2006 18:57 GMT
> I have a date conversion problem.
>
[quoted text clipped - 5 lines]
>3 On result from # 2 above, I want to indicate the 1st of the month.
> ( eg: 07/01/2006 )
I don't follow that. The difference between tow dates is
not a date, so how can you add 90 days and get another
date??
Regardless, You can use the DateSerial function to specify a
specfic part of a **date value**. For example, if you have
a value such as 7/21/06 in something named mydate, then you
can get 7/1/06 by using:
DateSerial(Year(mydate), Month(mydate), 1)
This is a versatie function so be sure to check Help for
more details.

Signature
Marsh
MVP [MS Access]
lalexander - 17 Jan 2006 21:52 GMT
Thanks for the response.
I apologize for the cryptic explanation.
You were however on target with the DateSerial Function.
That worked well.
Thanks for the response.
>> I have a date conversion problem.
>>
[quoted text clipped - 20 lines]
> This is a versatie function so be sure to check Help for
> more details.