Sysdate Equivalent

M

Mark Watkins

i am trying to use sysdate in my query:

SELECT * from nameofmytable WHERE sysdate >= start AND sysdate <= end

I tried they query and it asked me for a parameter for sysdate. Shouldn't
that already be in there?
Is there another keyhword for sysdate somewhere?

BTW, these newsgroups are very helpful. I appreciate everyone's time and I
wish to contribute when I can.

Mark
 
M

Mark Watkins

ok. I found the date() function. Any idea how to pass a date to date().
without parameters, it will show the current day, but what if I wanted to
give it a date like:
'10-28-2003'
or
'10/28/2003'

i haven't found any documentation on the date function. If someone could
even point me there, I'd appreciate it.
 
J

John Vinson

i am trying to use sysdate in my query:

SELECT * from nameofmytable WHERE sysdate >= start AND sysdate <= end

I tried they query and it asked me for a parameter for sysdate. Shouldn't
that already be in there?
Is there another keyhword for sysdate somewhere?

sysdate is a SQL/Server pseudocolumn. Access isn't SQL!

Use Date().
 
R

Rick Brandt

Mark Watkins said:
ok. I found the date() function. Any idea how to pass a date to date().
without parameters, it will show the current day, but what if I wanted to
give it a date like:
'10-28-2003'
or
'10/28/2003'

The Date() functions returns today's date. That's all it does. If you
mean you want to take a string that "looks" like a date and convert it into
an actual Data DataType then you need CDate().
 

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

Top