A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

dates problem



 
 
Thread Tools Display Modes
  #1  
Old June 1st, 2004, 03:47 PM
bogi
external usenet poster
 
Posts: n/a
Default dates problem

Hi, I have a table with records each with a certain dates,
I would like to make a report that gives me dates that are
one year ahead from the dates in the table (I want to
calculate the expiring warranty dates), I made a field in
a form that shows me that date, but I need to make a
report of it, can anyone help me, I can not write an
expression in querry that would return one year ahead
dates, can that be written with expression?
greetings
  #2  
Old June 1st, 2004, 06:05 PM
Newbie
external usenet poster
 
Posts: n/a
Default dates problem

Try something like:

SELECT tblWarranties.Cust, DateAdd("yyyy",1,[WarrantyExpire])-1 AS
ExpiryDate, tblWarranties.WarrantyExpire
FROM tblWarranties;

From a table that includes a field for when the warranty began it returns a
date in 1 years time

eg. Warranty starts 3/3/04 the ExpiryDate = 2/3/05
In the above eg. if you wish to return 3/3/05 then remove the -1 from the
expression
i.e.
SELECT tblWarranties.Cust, DateAdd("yyyy",1,[WarrantyExpire]) AS ExpiryDate,
tblWarranties.WarrantyExpire
FROM tblWarranties

HTH


"bogi" wrote in message
...
Hi, I have a table with records each with a certain dates,
I would like to make a report that gives me dates that are
one year ahead from the dates in the table (I want to
calculate the expiring warranty dates), I made a field in
a form that shows me that date, but I need to make a
report of it, can anyone help me, I can not write an
expression in querry that would return one year ahead
dates, can that be written with expression?
greetings



  #3  
Old June 1st, 2004, 06:53 PM
bogi
external usenet poster
 
Posts: n/a
Default dates problem

thanks a lot Newbbie
it works great
by
Bogi
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.