Interviewer And Interviewee Guide

Microsoft Access Developer Interview Question:

Tell me how do I add (or subtract) time differences to (or from) a date?

Submitted by: Muhammad
Access has many date manipulation functions - see Help for a full list.

Example - add 1 year to the system date:
=Date() uses the Date function and will give today's date (the system date).

=DateAdd ("yyyy",1, Date()) uses the DateAdd function to add one year to today's date.

You cannot reference another field in an expression like this in a table definition. But you could do so in VBA code for a data entry form, or in a calculated field in a query, for example.

=Date() + 365 will give a date in a year's time, but will not work for leap years!
Submitted by: Muhammad

Read Online Microsoft Access Developer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.