Access Expert 28
01. Break Apart Dates (21:59)
Day(), Month(), Year()
Hour(), Minute(), Second()
Is date in current year
Format property display -1/0 as True/False or Yes/No
Is date in previous year
Is date in next year
Is date in current month
Is date in current year to date
WeekDay() Function
WeekDayName() Function
MonthName() Function
What Day of the Week is Today?
First Day of Week
Last Day of Week
Tuesday Following Date
Weeks that Start on a Different Day (like Monday)
What's today's Weekday if week starts on Monday?
What's the date of the Monday before today?
Is Date a Work Day (Mon-Fri)
Is Date a Weekend Day (Sat, Sun)
02. DateAdd Function (9:32)
Query Insert Columns
DateAdd() Function
One day from Date
DateAdd Format Codes
One week from Date
One month from Date
One year from Date
How DateAdd handles leap years
One week before Date
Exactly 9 months from Date
Exactly 21 years before Date
1.5 years from Date
Within one calendar month from Date
Less than one calendar month before Date
Ten Minutes from Date
03. DateDiff Function (15:32)
Calculating Difference Between Two Dates
DateDiff() Function
Number of days between two dates
Number of days since order placed
Number of months until mortgage is paid
Someone's age (not 100% reliable)
Number of weeks since Jan 1st of current year
Number of minutes worked
First Day of Week Optional Parameter
First Week of Year Optional Parameter
04. DatePart Function (16:52)
Working with individual date components
DatePart() Function
Show orders from this year
Similar things with DatePart as with the Day, Month, Year functions
Date in a specific month
Date in a specific quarter
Date in current week of year
Invalid formulas on Microsoft's web site
Date in previous week
Date in next week
Be careful of suspicious behavior around the end of the year
Use optional parameters for DatePart
Date in previous month
Date in next month
Date in current quarter
Date in previous quarter
Date in next quarter
05. DateSerial Function (17:03)
First Day of Month
Last Day of Month
First Day of Previous Month
Last Day of Previous Month
First Day of Following Month
Last Day of Following Month
First Day of Quarter
Last Day of Quarter
First Day of Year
Last Day of Year
How Many Days in Month
How Many Days in Quarter
How Many Days in Year
What Day of the Year is it?
How Many Days Remaining in Year?
Exact Age / Anniversary Calculations
TimeSerial() Function Just like DateSerial
DateValue() Function
TimeValue() Function
CDate() Function - BOTH date AND time
Useful to convert strings to DateTime values
06. Ordinal Dates (08:40)
Displaying 1st, 2nd, 3rd, 4th, etc.
Discuss VBA Function for Ordinals
Learn how to calculate with IIF Functions
07. Miscellaneous (33:02)
Calculate Someone's Next Birthday Date
List of Birthdays in Next 60 Days
How many days until your next birthday
List of Birthdays from Next Month
Use the NZ function to substitute a date
Not all customers have CustomerSince
If NULL, assume start date of business
Field Level Validation Rules (Field-Level)
Table Level Validation Rules (Table-Level)
Validation Rule ShipDate > OrderDate
Validation Rule OrderDate <= Now()
|