13 hours ago: Power and Internet are out in my office due to Hurricane Ian. Click for details.
 
Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Seminars   Templates   TechHelp   Fast Tips   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > DatePart < Form Footer Totals | Prevent Duplicates >
DatePart
By Richard Rost   Richard Rost on Twitter Richard Rost on LinkedIn Email Richard Rost   7 months ago

Get Specified Part of Date. Year, Quarter, Week, etc.


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark Join Now

In this video I will show you how to use the DatePart function to isolate specific parts of a date/time value such as the day of the year, week of the year, month, quarter, and so on. DatePart offers some options that other functions don't have.

Damon from Waterville, Ohio (a Platinum Member) asks: I have a query that shows sales for the year, but right now I have to type in the start date (say 1/1/2021) and the end date (12/31/2021) and it's a bit of a pain EVERY time I run the query. Is there any way I can simplify that to just type in the year only?

Members

Members will learn about the FirstDayOfWeek and FirstWeekOfYear options, how to determine if a date falls within the same calendar week as the current date, and how to determine if a date falls in the same quarter of the current year.

Member Addendum

I completely forgot to mention this in the video: the whole reason why it's handy to use the mathematical approach I showed to calculate the current quarter is because it makes it much easier to find records in the next quarter, or the previous quarter, or even use this for months. That way if you want the next quarter, and you're in the 4th quarter, you don't have to add 1 to the year and make the quarter value 1. Just use the little math trick I showed you and add 1 to that value. See how easy? I cover this in a lot more detail in the DateTime Seminar

Silver Members and up get access to view Extended Cut videos, when available. Gold Members can download the database template from class plus get access to the Code Vault. If you signed up on YouTube you have to register on my YouTube Find User page so I can set up your account here on my web site. If you're not a member, Join Today!

Links

Suggested Courses

Learn More

FREE Access Beginner Level 1
Access Level 2 for $1.00

Free Templates

TechHelp Free Templates
Blank Template
Contact Management
Order Entry & Invoicing
More Access Templates

Resources

Mailing List - Get emails when new videos released
Consulting - Need help with your database
Tip Jar - Your tips are graciously accepted

Questions?

Please feel free to post your questions or comments below or post them in the Forums.

Keywords

microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, DatePart, parts of a date, year, quarter, month, day of year, week, week of year, weekday, week number, hour, minute, second, first week of year, first day of week, Date in current week of year, DatePart Function, How do you calculate quarters in Access, How do I extract month and year from date in Access

 

Start a NEW Conversation
 
Only students may post right now. Click here for more information on how you can set up an account. If you are a student, please LOG ON first.
 
Subscribe
 

Check out these other pages that may be of interest to you:

9/27/2022Report Border
9/26/2022First Day of Month
9/23/2022Before Update
9/22/2022Synchronize Subforms
9/21/2022InputBox
9/20/2022Link Master Fields
9/19/2022DateSerial
9/18/2022Sequential Annual Coding
9/16/2022Scope
9/15/2022Resize Forms
 
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Email Richard
Mailing Address
Phone Number
Fax Number
Course Survey
Blog RSS Feed    Twitter

YouTube Channel    LinkedIn
Keywords: TechHelp Access parts of a date, year, quarter, month, day of year, week, week of year, weekday, week number, hour, minute, second, first week of year, first day of week, Date in current week of year, DatePart Function, How do you calculate quarters in Ac  PermaLink  DatePart in Microsoft Access