microsoft Query with Excel

  • Thread starter Thread starter Karen
  • Start date Start date
K

Karen

I'm trying out some stuff and need help with MS Query with Excel.

My company will be using SQL databases after a major upgrade to our business
system. One of the things I hope to do is query an SQL file and select
records where the date field is greater than todays date minus six
(ardisfil.ar_dist_dt > date()-6). My problem is I don't see a date()
function!

Any ideas for me?

Karen
 
Karen

=Now()-6 should work

You can also add a parameter to a worksheet cell and use that

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
in Microsoft Query there doesn't seem to be a Now() function either.

I don't want to do the parameter in the worksheet. It needs to be done in
the Query itself.

K-
 
=Now()-6 should work

AFAIK, Now() will only work when the data source and provider in
question are MS Jet.

The ANSI standard, which in Jet does not implement, is

SELECT CURRENT_TIMESTAMP

The (mis)use of the term 'SQL database' often implies a MS SQL Server
database, for which the ANSI standard will work, as will the
proprietary (but widespread GetDate() function.

Jamie.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top