473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How do I create a Criteria where the end date of my data is 6 months from now?

I have some property data, and need to create a criteria which will show me what leases end dates are greater then 6 months from now, a bit confused..
Sep 15 '12 #1
2 1567
zmbd
5,501 Expert Mod 4TB
Use the DateAdd() function in the criteria section of a normal select query. Place ">" in front of it.
http://office.microsoft.com/en-us/ac...001228810.aspx
If you still have issues, post back with your code and/or an explanation of what you've tried.
Sep 15 '12 #2
TheSmileyCoder
2,322 Expert Mod 2GB
In the criteria field you write:
Expand|Select|Wrap|Line Numbers
  1. >dateadd("m",6,Date())
The Date function gives you todays date, and the dateadd adds 6 months to it. The "m" is telling DateAdd to use Months.

Other valid settings are:
Expand|Select|Wrap|Line Numbers
  1. Setting Description 
  2. yyyy Year 
  3. q Quarter 
  4. m Month 
  5. y Day of year 
  6. d Day 
  7. w Weekday 
  8. ww Week 
  9. h Hour 
  10. n Minute 
  11. s Second 
  12.  
Sep 15 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Yong Wang | last post by:
> Hi: > We have a database system. In the database, we have an > attribute called date0, which contains date data (format: > i. e. 2004-08-12). I wrote a script to fetch the data > in a...
2
by: Remi Caron | last post by:
Hi, I took over an Visual Object project (Visual Clipper) in that language there is a function to: Convert a string containing a 32-bit binary date to a date data type. That function is called...
1
by: Steve | last post by:
I am trying many ways to create and save data to an Excel file, but all I got is the following error message. (The code behind is in C#.net) System.UnauthorizedAccessException Here is my...
1
by: glenn | last post by:
Hi folks, I am doing an UPDATE to a table that has a field for a DATE data type. I am using MS Access. The UPDATE works fine but when I try to place the DATE field in the mix it blows up. ...
2
by: mtal | last post by:
as i have a csv file in this one field is having date data but when i am using sql loader to load the data in table i am getting a error massage , can anybody suggest me how i will load the data .
1
by: kalpu123 | last post by:
how to create retrive the data from database for every 2 minutes
4
by: rathika2786 | last post by:
Hi All, i m a new user to visual basic 6.can some one explain to me in detail as to how to create user defined data types?wat reference i should create for it?how to craete references?where should i...
6
by: dkyadav80 | last post by:
Hi guys, I have a form in html , all description below: first: name of persion (input type box) second: job profile (input type box) third: experience from: list box (Month : Jan, Feb,.....
6
by: gozdeata | last post by:
hey there, i m trying to get only time information of a date type variable. i got a column in type of char, it keeps time info in hh:mm format - 5 characters when i tried to convert it to date...
3
by: brendanmcdonagh | last post by:
I have these values in an array after using split $alltogether = $day . "," . $month . "," . $hour . "," . $minutes . ","; $arr=split(",",$alltogether); // splitting the array $d=$arr; //...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.