Adding a new Field for calculation of dates

Braindead90

New member
Local time
Today, 01:38
Joined
Oct 10, 2013
Messages
7
Hello, I am working on updating another person access database and I am in need of assistance of how to add a calculated field. I need to add a field to an existing table to subtract the date listed in one field from todays' date. It would need to return the answers in days

ie
10/10/13 - 10/1/13 = Return answer of 9 days

I have been told about DateAdd but I cant find these date function in the option of expression builder.

Some assistance would be kindly appreciated..
 
One way would be to add another unbound field and in the control source

="Days from today: " & DateDiff("d",[nameofdatefield],Date())

Any text you like between the ""


for a query just new field eg. days: Date()-[nameofDateField]
hope this of use to you

Regards
 
Last edited:
Braindead90 ,A belated welcome to the forum, i failed to notice that this was your first post ,when i replied to your post. I would appreciate some feed back as to whether or not my suggestions solved the problem?
Regards
 
how to add a calculated field. I need to add a field to an existing table
Ypma already told you what to do to solve your problem, I just want to EXPLICITLY add that it is very much a bad idea to actually store calculated fields inside a table. As per Ypma's suggestion you are much better off calculating them on the fly in a query/form or Report.
 

Users who are viewing this thread

Back
Top Bottom