Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 10:17 AM
Roffee
Guest
 
Posts: n/a
Default Date calculations

Hi.

I'm a bit confused about date functions in Access. I need the program to
calculate a new date that lays 15 days ahead of a given date in a table. I
studied the datediff function, but as I see it, it only returns a number of
days (or other time period) between two dates. I need a future date as
output.

Hints anyone?


-roffee


  #2  
Old November 13th, 2005, 10:18 AM
Tim Marshall
Guest
 
Posts: n/a
Default Re: Date calculations

Roffee wrote:
[color=blue]
> I'm a bit confused about date functions in Access. I need the program to
> calculate a new date that lays 15 days ahead of a given date in a table. I
> studied the datediff function, but as I see it, it only returns a number of
> days (or other time period) between two dates. I need a future date as
> output.
>
> Hints anyone?[/color]

Look for the dateadd function

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
  #3  
Old November 13th, 2005, 10:18 AM
MGFoster
Guest
 
Posts: n/a
Default Re: Date calculations

Roffee wrote:[color=blue]
> Hi.
>
> I'm a bit confused about date functions in Access. I need the program to
> calculate a new date that lays 15 days ahead of a given date in a table. I
> studied the datediff function, but as I see it, it only returns a number of
> days (or other time period) between two dates. I need a future date as
> output.[/color]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It might be that you're trying to use a function that will not give you
the correct results. Try reading the Access VBA Help article on
"DateAdd Function." Basically, to get 15 days ahead of a specific date:

NewDate = DateAdd("d", 15, SpecificDate)

Or you can do this

NewDate = SpecificDate + 15

The "d" is an interval indicator. Various others are:

d = day
y = day of year
yyyy = year
q = quarter
m = month
w = weekday
ww = week
h = hours
n = minute
s = second
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQm6lBoechKqOuFEgEQL/FwCaAxkVTmNBD8qiPGCNcgXE2k4A3OAAn1FY
Qtsa9BNYKPwU8YX3Wu0uPvuX
=e4pc
-----END PGP SIGNATURE-----
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles