how to show remaining days in query

sspreyer

Registered User.
Local time
Today, 13:34
Joined
Nov 18, 2013
Messages
251
hi all

I have goggled the hell out of this can't find a solution.

right I have a query call courses and field name expiry date I have add additional field within the query to show how many day left and how many days over the expiry date

I have had a good go myself with no joy here what I have tried
Code:
DayLeft:[expirydate]-now()
but i just get a error when i run the query

I also would like to ask is this possible to be done within the table e.g adding another field dayleft and some how add formula to calculate number days left or over due

if not no worries

thanks in advance for your time and knowledge

cheers

shane
 
You are doing this correctly in a query. This data shouldn't be in a table.

What exactly is your error message? My guess is it is caused by Null [expirydate] values. Do you have any null values for that field in your underlying table?

When that guess turns out to be wrong, my second guess is that [expirydate] is not a date/time field. What type of field is [expirydate]?
 
When that guess turns out to be wrong, my second guess is that [expirydate] is not a date/time field. What type of field is [expirydate]?

you were right Plog legend i had the field set as a text field not date/time also i found that using now() give me the exact value e.g -15.3646577 so i have change this to date() give me -15 thank for you time plog


cheer

shane
 

Users who are viewing this thread

Back
Top Bottom