Tell me how do I add (or subtract) time differences to (or from) a date?
Submitted by: MuhammadAccess 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
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
Top Microsoft Access Developer Questions
| ☺ | Tell us what property does every object in MS Access have? |
| ☺ | What are managing Data Tasks? |
| ☺ | Tell us how Do You Create An Append Query? |
| ☺ | Tell us About The Various Features Present In Ms Access? |
| ☺ | Tell us what format should my database be saved in to allow different versions of Microsoft Access to open the database? |
Top Databases Programming Categories
| ☺ | RDBMS Interview Questions. |
| ☺ | SQL Interview Questions. |
| ☺ | SSRS Interview Questions. |
| ☺ | Sybase Interview Questions. |
| ☺ | Database Administrator (DBA) Interview Questions. |
