?
Solved

Checking for date in msquery in Excel

Posted on 2011-10-05
1
Medium Priority
?
227 Views
Last Modified: 2012-08-14
I currently have a query in Excel that the date is being changed manually each month. I would like the code so that the date will be based on the today's date so the code will not have to be changed.

I would like to check DATEA is within the last 12 months

I would like to check DATEB >=  today and DATEB is < today +1   (essentially = to today, but because the query uses both parameters I would like to leave the option for a range.
0
Comment
Question by:morinia
1 Comment
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 1000 total points
ID: 36918765
Today's date
=INT(NOW())

Use the INT function to force the time to midnight (zero hour).

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question