PDA

View Full Version : Solved: expression problem



GaryB
11-17-2004, 09:59 AM
THIS IS FIXED. USED NOW() INSTEAD OF DATE()

Hi,

Need some help please. I have a query that has a field called month. it's data type is set as date/time. in the criteria I have an expression as follows:

between date () and date () -365

what this had been doing is controlling a report that produces data from the current date back one year. All of sudden I am getting a message
" undefined function 'date' in expression.
This has been working fine until now and I have not changed anything other than to input data. Does anyone have any idea what might be going on here?
Correction, we did upgrade the operating system to Windows XP Professional.

Thanks in advance

GaryB

mdmackillop
11-17-2004, 10:04 AM
Hi Gary,
Try Now() instead of Date()
MD

GaryB
11-17-2004, 10:07 AM
I did, and it only responds to 4 months worth of data instead of 12 months as before.

Thanks



Gary

GaryB
11-17-2004, 10:19 AM
boy do I feel really stupid! When I said now didn't work I had forgotten that I was working on an old copy of the database and that I only had data for that many months. Now () did work on the real database.

Thanks

Gary

mdmackillop
11-17-2004, 10:38 AM
Glad it worked out.
MD

mark007
11-18-2004, 02:18 AM
Hi Gary, check out the mark solved option under thread tools for solved threads ;)

GaryB
11-18-2004, 09:10 AM
i must be blind - didn't find the tool your refering to

G

mark007
11-19-2004, 02:45 AM
Hi Gary,

When you view the thread just above the first post are:

Thread Tools Search this Thread Rate Thread Display Modes

Under Thread Tools shoukd be the option 'Mark Solved', select this and hit 'Perform Action'.

:)

GaryB
11-19-2004, 08:39 AM
found it

thanks